Closed ksteigerwald closed 3 weeks ago
I was able to reset the pk increment using the following command in the sql editor.
-- Reset the sequence for the refresh_tokens table
SELECT setval('auth.refresh_tokens_id_seq', (SELECT MAX(id) FROM auth.refresh_tokens));
Bug report
SMS OTP login stopped working. Whenever a customer tries to login they get an error back: duplicate key value violates unique constraint "refresh_tokens_pkey" or Token has Expired.
Describe the bug
I login using OTP via SMS, I get this errors mentioned above
` const handleLoginWithOTP = async () => { const { data, error } = await supabase.auth.signInWithOtp({ phone }); console.log(data, error) if (error) { setErrHeading('Invalid Phone Number') setErrBody(error.message) setAlertState(true) setTimeout(() => { setAlertState(false)}, 5000) return; } setVerify(true); }
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
For you to be forwarded to the customer page.
Screenshots
If applicable, add screenshots to help explain your problem.