I'm currently implementing Google OpenID to achieve sign in with google on my website. Following the tutorial given by google. It emphasizes only the
id_token
is the thing to send to backend-sever. Since I'm using Java as backend and I couldn't find methods likegetName()
onid_token
in google api library. I can only retrieve email bygetEmail()
though.So how can I get user's name at backend?
Also, I realized the OpenID is the recommended in docs rather than Oauth2.0 if I only want to validate user's identity. I tried to implement Oauth2.0 too, but stuck on its working flow.
Here is what I get so far.
- button clicked ---> send a http get to certain api
- that api got invoked and run scribeJava code
- after I get the
Authorization url
, how do I open it as a popup window for user's confirmation? - and after confirmation, how to send the authentication code back to sever?
I know the blue map, but quite confused about the specific implementation.
Any help?