Context: I'm implementing a custom phone number authentication flow using a third-party OTP service. I'm trying to create a session in Appwrite, but encountering an user_invalid_token error.
Current Implementation:
try { final token = await account.createPhoneToken( userId: ID.unique(), phone: phone ); final id = token.userId;
// Generating custom OTP generatedOTP = generateOTP();
// Attempting to create session await account.createSession(userId: id, secret: generatedOTP); } catch (e) { print('Error creating user: $e'); }
Additional Details:
-Using Flutter -Using a third-party OTP generation service -Getting ** AppwriteException: user_invalid_token, Invalid token passed in the request. (401)**
Recommended threads
- OAuth Invalid Success URL
I am trying to setup OAuth and this would be my configuration on Google: My OAuth Link: ``` "https://accounts.google.com/o/oauth2/v2/auth? client_id=(client_id...
- Use Server SDK for Authentication
Hey, I want to make a User-Login with GoLang x AppWrite and wanted to ask if that is even possible with the Server SDK or if I'd have to call the Rest-API manua...
- Discord OAuth returns invalid_client no ...
I am attempting to integrate with Discord's OAuth. So far I have; 1. Created a Discord app and added my Appwrite's project redirect URI 2. I enabled Discord OA...