
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
- Can't reach Frankfurt server
I have been developing an IoT device that senses an event, takes a picture and pushes the jpg to an appwrite project. I'm using a Sixfab Pico LTE board that cou...
- Flutter - FCM: App Crashes when receivin...
- Firebase Messaging Causes ANR on Notific...
I am working on a Flutter project where I have set up notifications using Firebase Messaging. Everything was working perfectly until recently. After coming back...
