access_token audience is not for this project
See original GitHub issueSo I’m trying to signIn with but I’m getting the following error: access_token audience is not for this project
Here is my code:
GoogleSignin.signIn()
.then((user) => {
const credential = this.props.firebase.auth.GoogleAuthProvider.credential(null, user.accessToken);
this.props.firebase.auth().signInWithCredential(credential)
.then((user) => {
alert("We did it!!")
console.log('User successfully signed in', user)
})
.catch((err) => {
alert("Fuck!! " + err)
console.error(err);
});
})
.catch((err) => {
alert("err " + err)
})
.done()
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9 (1 by maintainers)
Top Results From Across the Web
access_token audience is not for this project #300 - GitHub
Hi guys, in case anyone is still having this error "access token is not for this project", mine was fixed by adding Whitelist...
Read more >access_token audience is not for this project - Stack Overflow
I`m getting 'access_token audience is not for this project' error while trying to authenticate from google via firebase
Read more >Authenticating service-to-service | Cloud Run Documentation
Once the calling service account has been granted the proper role, you need to: Fetch a Google-signed ID token with the audience claim...
Read more >ID Token and Access Token: What Is the Difference? - Auth0
If your API accepts an ID token as an authorization token, to begin with, you are ignoring the intended recipient stated by the...
Read more >Microsoft identity platform access tokens
Learn about access tokens emitted by the Azure AD v1.0 and Microsoft identity platform (v2.0) endpoints.
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
Hi guys, in case anyone is still having this error “access token is not for this project”, mine was fixed by adding Whitelist client IDs in Firebase Console with that found in the google-services.json file. Hope this helps someone.
SOLVED for me. I have two Firebase projects, one for development, and one for production. The development config has the SHA-1 for the debug build, and the production config has the SHA-1 for the release build. This error only occurred when I was using the the debug build with the prod config.
So the problem was that my build’s SHA-1 fingerprint didn’t match the one in Firebase project, but not because of the config. It was my build variant.
Hope this helps you.