firebase auth addScope question
qiquanlu opened this issue · 1 comments
qiquanlu commented
Hi firebase team,
I followed your doc here
- 2, Specify additional OAuth 2.0 scopes.
I added following code try to get user's firstName & lastName value
provider.addScope('https://www.googleapis.com/auth/userinfo.profile')
I can see the values are being returned for the post request https://identitytoolkit.googleapis.com/v1/accounts:signInWithIdp?key=xxxxxxxxxxxxxx when inspecting browser network section,
but not be able to get it from the firebase response.
Is this an expected behavior or there is something I missed?
Thanks
qiquanlu commented
I figured it out, need to call getAdditionalUserInfo(resp) to get additional user information.
It would be helpful to include a link of https://firebase.google.com/docs/reference/js/auth#getadditionaluserinfo within the Specify additional OAuth 2.0 scopes doc