SupabaseS
Supabase13mo ago
rai

Anyone experiencing expired OTP errors recently?

Lately like 20% of my users can't sign in with OTP via email randomly. Sometimes they can other times not. Even if they click on the email link to sign in after a couple of seconds, supabase can simply say that the OTP is expired.

The most annoying thing is that every time I try it myself, I don't get any errors. My verify code is really simple:
await supabase.auth.verifyOtp({
      type,
      token_hash: tokenHash
    })

Where type is always email. And the way I send OTPs is:
await supabase.auth.signInWithOtp({
      email: body.email.trim(),
      options: {
        shouldCreateUser: false,
        captchaToken: body.captchaToken,
      }
    })

Anyone here has experienced the same thing or has any insight into possible solutions?
Was this page helpful?