
Hello, I am using phone authentication for my project. I am sending the code using createPhoneToken and verify the code with updatePhoneSession. It verifies correctly when there is only one user in the database but after the first user is verified, the second user still gets the SMS code but the verification code cannot be verified. Here is my code, could you please indicate what I am doing wrong. Thank you for your help.
Future<String> sendPhoneVerificationCode(String phone) async { try { final token = await _account.createPhoneToken( userId: ID.unique(), phone: phone, ); return token.userId; } catch (e) { rethrow; } }
Future<models.Session> verifyPhoneCode(String userId, String code) async { try { final session = await _account.updatePhoneSession( userId: userId, secret: code, ); return session; } catch (e) { rethrow; } }
Recommended threads
- UI for creating API keys is broken (chro...
It get stuck like in the screenshot, cant scroll further down or find/click the button to create the API key.
- I want to know about the new pricing pla...
My project is around 150 to 200 in appwrite so do I have to pay $15 per project for each of them separately or just for them will I have to pay only $25 monthly
- Show execution status 500 unable to set ...
I want to set the labels at the time user signup to my application , all things work , users data save in auth, updateprefs set , a verification email sent , bu...
