Skip to content

Commit

Permalink
+upd: throw error if !code
Browse files Browse the repository at this point in the history
nicitaacom committed Nov 25, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 859a674 commit 67b651f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/(auth)/auth/callback/recover/route.ts
Original file line number Diff line number Diff line change
@@ -44,5 +44,8 @@ export async function GET(request: Request) {
const error_description = encodeURIComponent("No user found after exchanging cookies for recovering")
return NextResponse.redirect(`${requestUrl.origin}/error?error_description=${error_description}`)
}
} else {
const error_description = encodeURIComponent("No code found to exchange cookies for session")
return NextResponse.redirect(`${requestUrl.origin}/error?error_description=${error_description}`)
}
}

0 comments on commit 67b651f

Please sign in to comment.