Supabase Auth: OTP Has Expired
After opening an email with a login link, the system shows expired or invalid token. The one-off token has limited validity and can also be used earlier.
How to determine the source of the error
Check the time to generate the link and see if the same link has already been opened in another window or mail scanner.
Verify the OTP validity configuration and the callback method in the application.
What to do step by step
1. Show the user the button to generate a new link and a clear expiration message. Especially check that the prefetch links in the box does not use token before clicking the user.
2 . Do not try to recover used token; a new attempt should create a new independent login process.
How to check the score
The new token allows you to log in only once, and the old one remains invalid.
What to do
Do not extend the time of life of the login tokens at the expense of safety.