Error : The nonce in ID Token does not match the SHA256 hash of the raw nonce n the request. #10296
Replies: 4 comments 3 replies
-
@IanFangQuad did you manage to make it work or to find a solution? |
Beta Was this translation helpful? Give feedback.
-
@IanFangQuad @YoamFarges I'm also facing the same issue, also tried generating the random string for nonce but its not working at all |
Beta Was this translation helpful? Give feedback.
-
I had the same issue. Resolved? |
Beta Was this translation helpful? Give feedback.
-
Just in case another poor soul ends up here from google search: The This is the equivalent code in react-native: import * as Crypto from "expo-crypto";
const nonceRaw = uuid();
const digest = await Crypto.digestStringAsync(
Crypto.CryptoDigestAlgorithm.SHA256,
nonceRaw
);
const credential = auth.FacebookAuthProvider.credential(
// @ts-ignore
isIOS ? fbToken.authenticationToken : fbToken.accessToken,
isIOS ? nonceRaw : undefined <---- notice we pass the uuid() here without sha256 applied to it
);
const { user, additionalUserInfo } = await auth().signInWithCredential(credential); |
Beta Was this translation helpful? Give feedback.
-
Hello, I am new to flutter. I want to integrate line login with firebase.
First, I have set line as a auth provider in firebase console with openID connect.
Second, I use flutter_line_sdk to login user and receive access token , id token, etc.
Then I want to use these data to get credential by OAuthProvider("oidc.line").credential(....) and signInWithCredential( credential ), but always got this error while the two nonce looks same when get credential, no matter use line generate nonce or use nonce generate by myself.
Where should I notice? Thanks.
*test on IOS
Beta Was this translation helpful? Give feedback.
All reactions