Repository navigation
Migrate off bento-auth-js onto Auth.js (next-auth v5) #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
9b4918f
feat(public): add Auth.js infra alongside bento-auth-js
SanjeevLakhwani 9382bc1
feat(public): switch every bento-auth-js consumer over to Auth.js
SanjeevLakhwani de57388
chore(public): drop bento-auth-js dependency
SanjeevLakhwani 5b5c064
fix(public): set explicit OIDC issuer for Auth.js provider config
SanjeevLakhwani 2bb7cfc
refactor(public): extract session refetch interval into a named constant
SanjeevLakhwani 64a1ac0
refactor(public): reuse bento-auth-js's resource/permission exports i…
SanjeevLakhwani 87fd4b1
refactor(public): remove redundant comments from Auth.js migration
SanjeevLakhwani 9b1a3c9
Merge branch 'feat/next-migration-step1' into feat/authjs-migration
SanjeevLakhwani 9c2cdba
fix(public): force re-auth when refresh token becomes invalid
SanjeevLakhwani b459d2c
fix(public): wait for the Auth.js session before fetching projects
SanjeevLakhwani d12f77e
refactor(public): make the session refetch interval an env var
SanjeevLakhwani 1ad5662
refactor(public): share the OIDC provider id between Auth.js config a…
SanjeevLakhwani abbcc48
Merge remote-tracking branch 'origin/main' into feat/authjs-migration
SanjeevLakhwani 6017815
Merge remote-tracking branch 'origin/main' into feat/authjs-migration
SanjeevLakhwani 2412a42
refactor(public): rename bentoProvider to bentoOidcProvider for clarity
SanjeevLakhwani f495d4a
docs(public): note the discovery document cache duration
SanjeevLakhwani 37d439b
docs(public): credit bento-auth-js for the ported permission hooks
SanjeevLakhwani bae0159
docs(public): combine session/JWT module augmentation comments
SanjeevLakhwani e347af5
Merge remote-tracking branch 'origin/main' into feat/authjs-migration
SanjeevLakhwani a562795
fix(public): use our own useAccessToken in TracksView, not bento-auth…
SanjeevLakhwani 232a7dc
Merge remote-tracking branch 'origin/main' into feat/authjs-migration
SanjeevLakhwani 5b97827
fix(public): keep Sign Out button in a loading state through the redi…
SanjeevLakhwani 4190f9a
docs(public): explain jwt/session callbacks and add safety note + TODO
SanjeevLakhwani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 contains hidden or 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,3 @@ | ||
| import { handlers } from '@/auth'; | ||
|
|
||
| export const { GET, POST } = handlers; |
This file contains hidden or 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,11 @@ | ||
| import { CLIENT_ID, getEndSessionEndpoint } from '@/auth'; | ||
|
|
||
| export async function GET() { | ||
| try { | ||
| const endSessionEndpoint = await getEndSessionEndpoint(); | ||
| return Response.json({ endSessionEndpoint: endSessionEndpoint ?? null, clientId: CLIENT_ID }); | ||
| } catch (err) { | ||
| console.error('Error discovering end_session_endpoint', err); | ||
| return Response.json({ endSessionEndpoint: null, clientId: CLIENT_ID }); | ||
| } | ||
| } |
This file contains hidden or 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 contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.