Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom URL parameter Oauth from Setting

ANSWERED

Is there a way to set custom url parameters for the oauth url in the settings?

 

For google oauth i need :

 

access_type=offline

 

<Oauth

settingsKey="oauth" title="OAuth Login" label="OAuth" status="Login" authorizeUrl="https://accounts.google.com/o/oauth2/v2/auth" requestTokenUrl="https://www.googleapis.com/oauth2/v4/token" clientId="11111" clientSecret="asdfxxx" scope="profile" customParameter=myvalue />

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions
<Oauth
          settingsKey="oauth"
          title="Google Authentication"
          label="Approve Access to Google"
          status={getDisplayWebAPIStatus(props)} 
          authorizeUrl={CREDENTIALS.google_authorisation_url}
          requestTokenUrl={CREDENTIALS.google_access_token_url}
          clientId={CREDENTIALS.client_id}
          clientSecret={CREDENTIALS.client_secret}
          scope={CREDENTIALS.scope}
          pkce="true"
          oAuthParams={{
              access_type : 'offline',
              prompt : 'consent'}}
        />

View best answer in original post

Best Answer
4 REPLIES 4

Is there a way to get a Google Oauth refresh token? Im stuck, i only get the auth token with the settings login...

 

Google needs to request a access_type which is set to offline. where can i set this in the settings?

 

https://developers.google.com/identity/protocols/OAuth2WebServer

Best Answer
0 Votes

is there a way to set custom url parameters for the oauth url? For the google oauth i need :

 

access_type=offline

 

<Oauth

settingsKey="oauth" title="OAuth Login" label="OAuth" status="Login" authorizeUrl="https://accounts.google.com/o/oauth2/v2/auth" requestTokenUrl="https://www.googleapis.com/oauth2/v4/token" clientId="11111" clientSecret="asdfxxx" scope="profile" customParameter=myvalue />

Best Answer
0 Votes
<Oauth
          settingsKey="oauth"
          title="Google Authentication"
          label="Approve Access to Google"
          status={getDisplayWebAPIStatus(props)} 
          authorizeUrl={CREDENTIALS.google_authorisation_url}
          requestTokenUrl={CREDENTIALS.google_access_token_url}
          clientId={CREDENTIALS.client_id}
          clientSecret={CREDENTIALS.client_secret}
          scope={CREDENTIALS.scope}
          pkce="true"
          oAuthParams={{
              access_type : 'offline',
              prompt : 'consent'}}
        />
Best Answer

Thanks for the reply. This was exactly what i was looking for. Works now like a charm. Will this be official, also in the docs? 

Best Answer