SupabaseS
Supabase12mo ago
JC

Token has expired or is invalid

Hello! I launched a new Flutter app today and I have hundreds of users who are trying to sign up using verifyOtp, but they keep getting the error: "token has expired or is invalid". The weird thing is that I can't reproduce the error. Everything works great for me, and there are also several other users where it works fine. So I'm at a loss for what to try next. Here is the code I'm using to send a code to the user, who is signing up for the first time:

final data = await Supabase.instance.client.auth.verifyOTP( email: widget.profileData['email'], token: _otpController.text, type: OtpType.email, );

Like I said, this works fine for me every time I use it in the simulator and on the production app. I've even deleted my user record in the auth.users table to start fresh, but the verification works fine for me and I get right in.

Any help would be appreciated!
Was this page helpful?