"Passed nonce and nonce in id_token should either both exist or not." React Native

I am facing this issue when try to sign in user using signInWithTokenId (google). Anyone has any idea? I am using this package to login my user via google and get the idToken: https://github.com/react-native-google-signin/google-signin
GitHub
GitHub - react-native-google-signin/google-signin: Google Sign-in f...
Google Sign-in for your React Native applications. Contribute to react-native-google-signin/google-signin development by creating an account on GitHub.
13 Replies
alphaboy
alphaboyOP3y ago
This is my code:
const onPressLogin = async () => {
GoogleSignin.configure({
iosClientId: 'IOS_CLIENT_ID',
webClientId: 'WEB_CLIENT_ID',
});

const userData = await GoogleSignin.signIn();
console.log('user => ', userData);

const resp = await supabase.auth.signInWithIdToken({
provider: 'google',
token: userData.user.idToken,
});

console.log('resp, ', resp);

};
const onPressLogin = async () => {
GoogleSignin.configure({
iosClientId: 'IOS_CLIENT_ID',
webClientId: 'WEB_CLIENT_ID',
});

const userData = await GoogleSignin.signIn();
console.log('user => ', userData);

const resp = await supabase.auth.signInWithIdToken({
provider: 'google',
token: userData.user.idToken,
});

console.log('resp, ', resp);

};
sunny
sunny3y ago
Hey @alphaboy , did you ened up figuring this out? Faacing the same issue atm
Frikkie
Frikkie3y ago
Hey! Did any of you end up making progress on this?
sunny
sunny3y ago
Nah bro, what about you?
Frikkie
Frikkie3y ago
GitHub
How do I get the nonce value out of the idToken from GoogleSignin, ...
// using this library for decoding import jwtDecode from 'jwt-decode' const handleLogin = async () => { setLoading(true); try { await GoogleSignin.hasPlayServices(); const u = await Goog...
Furkan Demirturk
Hello! Is there a solution I am facing with same issue
Eirik
Eirik3y ago
+1 bump
*ansible
*ansible3y ago
+1 Bump
David
David3y ago
+1
Hryhorii
Hryhorii3y ago
+1 Bump
Beleño
Beleño2y ago
+1
gov
gov2y ago
https://github.com/supabase/gotrue/issues/1205 still very much an open issue I'm afraid
GitHub
[BUG]: Supabase does not work with React Native Google signin · Iss...
Bug report I confirm this is a bug with Supabase, not with my own application. I confirm I have searched the Docs, GitHub Discussions, and Discord. Describe the bug Supabase describes in their docs...
gov
gov2y ago
I ended up switching to magic link

Did you find this page helpful?