I'm migrating from the Google sign-in platform library to the new Google Identity Services with one-tap sign in, but the website automatically logs the user out when they refresh or go to a different page.
This is the code that's present on every page that loads the one-tap sign in:
<div id="g_id_onload"
data-client_id="[CLIENT ID]"
data-callback="onSignIn"
data-auto_select="true">
</div>
Removing this just keeps the user logged out with no way to log back in. There is a cookie, g_state, that stores the user's login, as well as attributes to display the popup based on its presence, but working with this also keeps the user logged out with no way to log back in.
Is there any way to prevent automatic logout on refresh?