Hi everyone,
When user signs in using "Google Sign-in button" in my SPA, I receive id_token from callback and pass it to my backend. In response, my backed issues its own token for further session management.
Basically receiving id_token from callback is all I need.
I don't like that I need to take care of calling Gapi.auth2.getAuthInstance().signOut() when signing user out. Because of that, I need to make sure the library is initialized on all pages where I have "sign out" button, instead of just placing it inside a single compontent that renders sign in page.
Is there a way to use this library to request id_token from Google, without actually creating any session for the user?
Best,
Marek
@marekciupak you can use gapi.auth2.authorize for such one-off use case.
Most helpful comment
@marekciupak you can use gapi.auth2.authorize for such one-off use case.