fix: password reset redirect naar update-password pagina

This commit is contained in:
colinislit
2025-11-19 12:09:40 +01:00
parent 1c305c7d1e
commit d01eb0ba69
2 changed files with 3 additions and 2 deletions

View File

@@ -23,7 +23,8 @@ export async function GET(request: NextRequest) {
if (!error && data.user) {
// Password recovery flow - always go to update-password
if (type === 'recovery') {
// Check both query param and if next contains update-password (fallback)
if (type === 'recovery' || next.includes('/update-password')) {
return NextResponse.redirect(new URL('/update-password', request.url))
}