# Auth0 React.js logout on refresh

**URL:** <https://community.auth0.com/t/auth0-react-js-logout-on-refresh/73160>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [November 15, 2021, 3:09pm UTC](https://community.auth0.com/t/auth0-react-js-logout-on-refresh/73160 "2021-11-15T15:09:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![snurfer0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/snurfer0/32/33018_2.png) [@snurfer0](https://community.auth0.com/u/snurfer0)\
**Post date:** [November 15, 2021, 3:09pm UTC](https://community.auth0.com/t/auth0-react-js-logout-on-refresh/73160/1 "2021-11-15T15:09:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 16, 2021, 1:22am UTC](https://community.auth0.com/t/auth0-react-js-logout-on-refresh/73160/3 "2021-11-16T01:22:23Z")

</div>

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.

> [@snurfer0](#):
>
> Authorization Error. Error 401: Invalid\_client. The OAuth client was not found.

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 [https://marketplace.auth0.com/integrations/google-social-connection](https://marketplace.auth0.com/integrations/google-social-connection) docs.

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

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 1, 2021, 1:22am UTC](https://community.auth0.com/t/auth0-react-js-logout-on-refresh/73160/4 "2021-12-01T01:22:24Z")

</div>

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