
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
- my database attribute stuck in processin...
when i created attributes in collection 3 of those attributes become "processing", and they are not updating, the worst thing is that i cant even delete them s...
- Is Quick Start for function creation wor...
I am trying to create a Node.js function using the Quick Start feature. It fails and tells me that it could not locate the package.json file. Isn't Quick Start ...
- Forever Processing Issue
I encountered an issue when creating attributes in the collections . if you create an attribute of type string for example and choose a size of 200 or 250 or a...
