IdToken always null
See original GitHub issueAfter calling:
GoogleSignin.configure({
webClientId: '<My-Client-Id>'
offlineAccess: true
})
I then call GoogleSignin.signIn() and the user returned here always has a null IdToken. I have made sure the the webClientId is the same as on the console (as per below screenshot), and matches up with whats in my google-services.json.
The other data is there (even a serverAuthCode), but not the IdToken. What am I doing wrong?

Issue Analytics
- State:
- Created 7 years ago
- Comments:9
Top Results From Across the Web
idToken is Null GoogleSignin.getTokens() · Issue #836 - GitHub
Hi, I am getting null for idToken from const userInfo = await GoogleSignin.signIn(); const getToken = await GoogleSignin.
Read more >Getting idToken 'null' when using google_sign_in in Flutter
I need to send idToken to backend server to verify a user. But IdToken is null from google sign in response. code is...
Read more >authResult return idToken as Null - Auth0 Community
It seems that you're missing the proper scope for an OpenID Connect request. Add scopes like openid profile email and also the response_type ......
Read more >Access token is always null in azure ad B2C signin response
On sign in, I always get only id token and access token is always null. I tried passing "openid offline_access" along with my...
Read more >Getting idToken 'null' when using google_sign_in in Flutter ...
[Solved]-Getting idToken 'null' when using google_sign_in in Flutter-Flutter ... I faced with this Problem for two days and finally. (in my case) this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For firebase project, when you enable google auth, there is field
Web client IDunderWeb SDK configuration. Just copy that id towebClientIdinside yourconfigure()methodFor those of you who have the same issue as me I managed to figure this out.
Setting offlineAccess to true provides you with the serverAuthCode to use server-side, but no longer returns the idToken. If you wish to retrieve the idToken, do not set the offlineAccess in configure (It defaults to false).
This is not mentioned in the docs so I am unsure if this is intended bevahior or a bug?
TLDR: remove the offlineAccess setting from the configure call to get the idToken.