Any way to skip login page for Universal Login if only using Google sign in

Hello,

I am exploring the new auth0-spa-js library. My currently webapp (using auth0 js) only supports Google Sign In (by choice for for now), so on the first page shown the user has a “Continue with Google” button, and clicking that immediately signs the user in with google (showing google’s sign in page or account chooser as applicable).

So when I create a proof of concept with auth-spa-js - when the user clicks “Continue with Google” on my home page, it brings the user to the Auth0 universal login page, with only one button “Continue with Google” - so it doesn’t make sense from a user perspective to click this twice on two different pages.

So my questions are:

  1. If there is e.g. only social login provider I am using, is it possible to skip the Universal Login page and go straight to e.g. google sign in (or whatever the single supported social login is setup)?
  2. If so, would this be possible programmatically, i.e. if I ended up also supporting facebook login, could I pass the information to the call to loginWithRedirect so that it e.g. skips the login screen and selects the provider I have passed (facebook or google) depending on what button the user has clicked in my webapp’s page?

I know I could go back to using auth0 js but I wanted to see if I can use the new library.

Thanks.

With the auth0-spa-js you would pass the connection parameter (google-oauth2) in the authorize request like this:

Brilliant - thanks. Is there a list of valid options for connection?

https://auth0.github.io/auth0-spa-js/interfaces/redirectloginoptions.html#connection

You can put any connection name there. For the database connections, it’s the name you have the database, so it’s easy to know.

For the social connections, it’s not directly visible under Dashboard > Connections, but you can see the connection names of the out-of-the-box social connections in the user list:

You can also get a list of all connections names from the Management API / API Explorer:

and look for the name attribute of each connection, such as in this screenshot where I marked the name of the linkedin connection:

Perfect, thanks again

1 Like