So 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()
It is because the firebase u r using and the client ID (OAuth) that u generated from google developer are related to different project, make sure both are from same project.
@gokulkulkarni1987 Hi, I have the same issue, can you explain properly, please?
What do you mean "firebase u r using"?
I'm using same google-services.json file to setup firebase module and google-signin module.
What can be the diff here?
Thanks in advance!
Me too, can anyone help?
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.
Hope this helps you.
In an effort to clean the issues up, this is being closed. Please open a new issue with a reproduction if you're still experiencing a problem.
@egunsoma how did you create 2 different SHA-1 each projects?
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.

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.
@gunsym oh my god. After hours of searching your comment just saved my ass. I would never have thought of that and I already thought that I am too stupid to sign my APK. Thank you very much!
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.
Thank God after hours of trial and even deleting the app finally this solution worked. Thank you
Most helpful comment
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.