Auth0 React.js logout on refresh

I have a react.js SPA and I’m trying to add google auth to the application. It went well using the reactjs auth0 quickstart but I have noticed that after google login if you refresh the page, the user just logs out. I have searched on web about this issue and found that I have to create google credentials (client id and client secret) into the google social connection. After doing so, I try testing the connection and I get Authorization Error. Error 401: Invalid_client. The OAuth client was not found. This I get when I dont use the auth0 dev keys.

Hi @snurfer0,

Welcome to the Auth0 Community!

I understand that you are trying to accomplish SSO with the Google Social Connection.

First, the default Google Social Connection uses the Auth0 development keys which do not maintain the SSO sessions. As you observed, you’ll need to configure the connection with your keys to enable SSO, federated logout, and other features.

This error is thrown whenever the client ID used in your google-oauth2 Social Connection is invalid.

In this case, I recommend that you double-check that the client ID you provided in your google-oauth2 connection settings matches the one you created the client ID on Google Developer Console.

You can find more instructions in our Google / Gmail Integration with Auth0 docs.

Please let me know if you encounter any more issues. I’d be happy to walk through the setup.

Thank you.

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