Remember login after refresh with Google account

Hi,

I followed the React SPA quick-start and was able to successfully implement a Universal login. However, the login does not persist between refreshes when using a Google account, only a email-based one. This is the case for both my custom app and even cloning and configuring the quick-start repo project.

Am I doing something wrong here, or is this expected behavior?

1 Like

Hi Chris,

Couple of questions:

  • Are you using the Classic or New Universal Login Experience?
  • Have you configured the Google connection with your client ID and secret or are you using the Auth0 development keys?
2 Likes

@kstrongholte @chrissantamaria

I’ve ran into this same error using the “New Universal Login Experience”

  • In my application i’ve passed my client_id and domain that I got from auth0. I’ve also configured the Google connection.
  • I am using auth0 development keys

My User History on auth0 dashboard shows:

  • Initial Login: Success Login
  • Silent Login(on Page Refresh): Failed Silent Auth.

In my console I get:

Failed to load resource: the server responded with a status of 400 ()

@kennetfpostigo: Please try registering your application with Google to obtain your own client ID/secret and see if you still encounter these errors. There are several limitations when using development keys which can result in unexpected behavior and reduced functionality.

When I stood up the React quickstart and configured a Google connection (with dev keys), I observed the same behavior as @chrissantamaria.

1 Like

@kstrongholte How do I do this with google? Is it explained anywhere in any guide by Auth0? It would be super helpful. Can you point me in the right direction?

@kennetfpostigo

Our article Add Google Login to Your App would be a good place to start.

There’s a link in the first section about how to set up OAuth 2.0 for a Google application.

2 Likes

Let us know if you have any other questions about that!

I’m also facing this issue now in my project