How to send regular protected requests using Google sign in?

Viewed 91

I am trying to integrate the Google sign in sdk into my site. I have already added the GSI button to my site and on clicking it, google sends the IDtoken containing the user info to my oauth endpoint.

Using this token, I can now create a new user account.

So far so good.But I am not sure what I am to do from here.

Should I put this IDtoken into a http_only and secure, cookie so that all authz server requests will contain the userid?

I am seeing lots of cookie and local storage based data has been been added to my sites jar. Am I supposed to use them in any way?

What do I need to do after the token expires after 1 hr? Do I need to have my users login yet again? I did not get any refresh token along with the idtoken. Do I even need to handle the refresh token or is the gsi sdk supposed to take care of all that for me?

Another part which is not clear is what do I get from using the Google sign in button/sdk vs the general Oauth-openid flow.

0 Answers
Related