-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(auth): display auth error message in user menu
- Loading branch information
1 parent
06a1e21
commit 5b295a1
Showing
4 changed files
with
65 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { handleAuth, handleLogin } from "@auth0/nextjs-auth0"; | ||
import { captureException } from "@sentry/nextjs"; | ||
|
||
export default handleAuth({ | ||
login: handleLogin({ | ||
authorizationParams: { | ||
// Add the `offline_access` scope to also get a Refresh Token | ||
scope: "openid profile email offline_access", | ||
}, | ||
}), | ||
onError(_req, res, error) { | ||
console.error(error); | ||
res.status(error.status || 500).end(); | ||
captureException(error); | ||
}, | ||
}); | ||
|
||
export const config = { | ||
api: { | ||
externalResolver: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters