Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

OAuth 2.0 Consent Screen Link

Hey all,

I'm working on my integration for SSO with google and recently created an oauth consent screen and created new credentials for my web application, but I am not sure how to generate the link to the oauth consent screen. I know the link is formatted as "https://accounts.google.com/o/oauth2/auth?client_id={clientid}&redirect_uri={redirectURI}&scope={sco... but I was not sure how I could generate this link in the UI so it includes the scopes as well as the client_id and redirect_uri. Does anyone know if it is possible to generate the links to our oauth consent screens or do we need to manually create the links ourselves? This would be a nice to have since we would have a way to create the link with the registered scopes for testing or just seeing where users land when consenting to the application.

Solved Solved
1 2 2,736
1 ACCEPTED SOLUTION

Hi @ChrisKaseburg

Welcome to Google Cloud Community!

While there is no direct UI feature in the Google Cloud Console to generate the OAuth consent screen link with all the parameters pre-filled, you can manually format it by setting the parameters on that URL. 

To create the link manually:

  1. Refer to the following format:
    https://accounts.google.com/o/oauth2/auth?client_id={client_id}&redirect_uri={redirect_uri}&scope={scope}
  2. Replace the placeholders with your actual values:

For more information, you can refer to Using OAuth 2.0 for Web Server Applications documentation. Additionally, you may also consider filing a product feature request to allow you to generate the links according to your preferences so that our engineering team can look into it. Please note that I won’t be able to provide a timeline for when this will be implemented. 

I hope this helps.

View solution in original post

2 REPLIES 2

Hi @ChrisKaseburg

Welcome to Google Cloud Community!

While there is no direct UI feature in the Google Cloud Console to generate the OAuth consent screen link with all the parameters pre-filled, you can manually format it by setting the parameters on that URL. 

To create the link manually:

  1. Refer to the following format:
    https://accounts.google.com/o/oauth2/auth?client_id={client_id}&redirect_uri={redirect_uri}&scope={scope}
  2. Replace the placeholders with your actual values:

For more information, you can refer to Using OAuth 2.0 for Web Server Applications documentation. Additionally, you may also consider filing a product feature request to allow you to generate the links according to your preferences so that our engineering team can look into it. Please note that I won’t be able to provide a timeline for when this will be implemented. 

I hope this helps.

very helpful