Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
271 views
in Technique[技术] by (71.8m points)

node.js - VerifyIdToken is not returning email in the payload

I have implemented the Oauth2 using google-auth-library in nodejs. Here is the sample code.

let ticket = await client.verifyIdToken({idToken: token, audience: CLIENT_ID})
payload = ticket.getPayload()

It was working fine and I was getting email of the user in the payload, but now I am not getting email in the payload. To verify that the code is correct I went to the firebase console and added a new user by login with a different account on my react application and found out that even firebase is not able to get the email from the google.

Here is the screenshot

My application depends on the email present in the payload. Is there any other way to get email in the payload?

Thanks for the help!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...