Skip to content

Commit

Permalink
feat(callback): return always status code 401 on error (#4601)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomFreudenberg committed Jun 9, 2022
1 parent 81afeef commit 4daa63d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/next-auth/src/core/routes/callback.ts
Expand Up @@ -349,6 +349,7 @@ export default async function callback(params: {
}
} catch (error) {
return {
status: 401,
redirect: `${url}/error?error=${encodeURIComponent(
(error as Error).message
)}`,
Expand Down

0 comments on commit 4daa63d

Please sign in to comment.