How can I navigate directly to a specific provider's login page in Auth0?

I am trying to login to my application using identifier first and email provider. I disabled Username-Password-Authentication. I have given my gmail id and it is asking for code to login.

However, I’d like it to automatically navigate to the Gmail login page when I enter my Gmail address. How can I make this happen?

@auth0communityuser @lihua.zhang @marybeth.hunter kindly help me on this

Hi @gouthami.shivakoti,

Welcome to the Auth0 Community!

To navigate directly to a specific connection, you can add the connection parameter to your /authorize request. For Google, this will be connection=google-oauth2.

It will look something like this: https://YOUR_TENANT.us.auth0.com/authorize?client_id=CLIENT_ID&response_type=code&scope=openid+profile+email&redirect_uri=REDIRECT_URI&prompt=login&connection=google-oauth2

Doc on parameters for /authorize requests: Add Login Using the Authorization Code Flow

Please let me know if you have any additional questions!

Thanks,

Mary Beth

1 Like

Hi @marybeth.hunter,

Thank you for your response. I tried the code, and I am now able to navigate to the Gmail login page. Currently, I am implementing this locally, so my redirect_url is set to 'http://localhost:4200'. However, after entering the email and password, the redirection is not happening as expected. In the /authorize endpoint, the redirect_uri is being sent as undefined.

I have verified that 'http://localhost:4200' is correctly configured as one of the Allowed Callback URLs in my application settings.

Could you please help me resolve this issue?

I am now able to navigate to the redirect URI, and after entering the email ID, it redirects to the Gmail login page. How can I directly navigate to the Gmail password page?

Hi @gouthami.shivakoti,

I am happy to hear that this has helped you directly send users to the Google social login and that you successfully get redirected back to your localhost URL. You cannot send users directly to Google’s password page - adding the connection=google-oauth2 is the closest you can get presently. When sending users to an external IdP, what is shown on the IdP side is out of Auth0’s control.

Let me know if you have any additional questions!

Thanks,

Mary Beth

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.