Convex Auth: react-native expo OTP throws Uncaught Error: Could not verify code
I'm using the new
convex auth
in my react-native expo. I'm trying to implement authentication with OTP.
After having followed the documentation here https://labs.convex.dev/auth/config/otps, I, then, follow the demo project here
https://github.com/get-convex/convex-auth-example/blob/main/src/auth/SignInFormPhoneCode.tsx
Now, because in my use case I'm not using twilio
to send OTP sms, I have to implement my custom solution, following above example.
First here, I have implemented my custom sms OTP provider:
This provider works fine. It correctly sends the sms otp.
Second, here I implement my custom "verify" function:
GitHub
convex-auth-example/src/auth/SignInFormPhoneCode.tsx at main · get-...
Convex Auth example repo. Contribute to get-convex/convex-auth-example development by creating an account on GitHub.
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
The problem I'm facing is that the "verify" function throws a bunch of errors. Despite these errors, the user is able to login on the (mobile) client side.
Here are the errors in the debug panel:
As you can see from the logs, in the last line, despite the errors, the app ends up successfully login