FernandoOriginal post
Rank 2: Process
In Appwrite Docs, the example code doesn't put a nonce in createIdTokenSession.
final session = await account.createIdTokenSession(
provider: IdTokenProvider.google,
idToken: googleUser.authentication.idToken!,
);
On Android, this is working fine!
But on iOS it's throwing (the same code):
AppwriteException: user_oauth2_token_invalid, Nonce required (401)
If I try to generate and put a nonce there, it throws mismatch.
appwrite: ^27.0.0
Summary
Google sign-in in iOS through Appwrite is requiring a "nonce" even though the code example in the documentation does not include it. The issue is specific to iOS and can be resolved by including the nonce in the `createIdTokenSession` method call, or by ensuring it matches correctly if generated manually.