© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•2mo ago•
31 replies
Goon

Reset password Email Flow Problems

auth
Hi,

im trying to set up my reset password flow following the docs.

Implement Forgot password → email link → set new password using Supabase Auth in Next.js with supabase ssr.

I’m now getting 500 unexpected_failure when I try to send the recovery email (POST /auth/v1/recover).
- My UI just shows “Error sending recovery email”.
- Supabase Logs show multiple:
- POST /auth/v1/recover → 500
- error_code: unexpected_failure

Supabase also shows the generic “Auth server degraded / usually DB trigger/function issue” type message, but I haven’t created any custom triggers/functions.

I'm unsure as to why the email is not able to be sent. Prior to this I got the email to send fine. but when clicking the reset password link in the email didn’t create a session consistently:

Sometimes it landed on my home page with ?code=... in the URL
Sometimes it hits my reset page but updateUser({ password }) returns “Auth session missing!”

I’m trying to follow the PKCE flow with /auth/confirm + verifyOtp

1. I have pasted the email template provided in the docs into my reset email - email template: See img 1
(my reset passowrd route is /reset-password, so i change that in the email template)

2. i have create the file at app/auth/confirm/route.ts and pasted the required code from the docs: See img 2
( I have imported my supabase createClient from @lib/supabase/server)

3. I then created pasted the function in my server actions file:
'async function resetPassword() {
const { data, error } = await supabase.auth.resetPasswordForEmail(email)
}'

I have included my the code in my actions file for this: See img 3

I recognise that my function is called forgotpassword not reset, as im calling this in my forgot password page prior to resetting it.

4. See img 4 for reset password function in actions file

I dont understand what im doing wrong.
Any help would be much appreacited. Apologies in advance if im just blatantly missing something or not understanding something properly.
Screenshot_2025-12-23_at_22.07.41.png
Screenshot_2025-12-23_at_22.08.25.png
Screenshot_2025-12-23_at_22.14.41.png
Screenshot_2025-12-23_at_22.16.47.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Password changed email not sent during password reset flow?
SupabaseSSupabase / help-and-questions
2w ago
Expected reset password flow
SupabaseSSupabase / help-and-questions
2w ago
Password Reset PKCE Flow
SupabaseSSupabase / help-and-questions
13mo ago
Password reset for email .
SupabaseSSupabase / help-and-questions
2mo ago