Why am I getting OTP_EXPIRED on sign in?

I am following the email docs https://www.better-auth.com/docs/plugins/email-otp, I want to automatically register the user with email OTP but I keep getting OTP_EXPIRED the OTP is clearly not expired. Basic example is not working...

The flow:
  • sendVerificationOtp
  • authClient.signIn.emailOtp
Solution
I had to set the TZ environment variable to UTC 🤦‍♂️
Was this page helpful?