refactor: replace node-oauth with openid-client#1698
Merged
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nextauthjs/next-auth/GisAQuwZvX71DZj5zDfs8ui3U9HJ |
This was referenced Apr 12, 2021
This was referenced Apr 19, 2021
Closed
Conflicts: app/pages/api/auth/[...nextauth].js package-lock.json package.json pages/api/auth/[...nextauth].js src/providers/bungie.js src/providers/google.js src/providers/mailru.js src/providers/vk.js src/providers/yandex.js src/server/index.d.ts src/server/lib/oauth/callback.js src/server/lib/oauth/client.js src/server/lib/signin/oauth.js www/docs/configuration/pages.md
3 tasks
mnphpexpert
added a commit
to mnphpexpert/next-auth
that referenced
this pull request
Sep 2, 2024
* chore(deps): add openid-client * chore: merge in next * refactor(provider): remove redundant requestUrl param * feat(provider): make profile callback optional * refactor: use openid-client for OAuth2/OIDC * refactor: use openidClient in oauth signin handler * refactor: use openidClient in oauth callback handler * docs(warn): add async issuer/old config warnings * chore(deps): remove jsonwebtoken * chore: add issuer property for testing locally * chore(dev): import providers one-by-one * fix(oauth): handle when no user in body/query * chore(deps): remove pkce-challenge * chore(dev): change Auth0 protection * refactor(oauth): simplify pkce/state * refactor: split OAuth1 client, reduce openid client will improve API in another PR * chore: change comment, dev app * chore: mention OIDC client config discovery * fix: add new operator when creating OIDC client * refactor: delete req.query.nextauth after use * docs(ts): use `TokenSet` from `openid-client` * chore: simplify/type signin route * refactor: rename to client-legacy to indicate intnet of maintenance * chore(deps): try setting `oauth` as optional peer dep * chore(deps): add `oauth` back as regular dependency * chore(deps): add @types/oauth as dev dependency * chore: remove params kept for backwards compatibility * chore: don't make breaking changes in this PR * chore(core): use correct TS declarations * refactor: move files/add more accurate types internally * chore: remove TODO comment * chore: catch all errors in authorization URL generation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Continuation of #1105
We rely on a package that hasn't been updated in a very long time. We kind of depend on it even after this, as our new dependency doesn't support OAuth 1.0 anymore, but we will treat it as a legacy solution and will only provide minimal maintenance to it. There are a few bigger providers still using the old spec like Twitter, but new providers will hopefully rather rely on newer specs.
Our new choice
openid-clientis maintained properly by awesome people, and will help us with PKCE, state and other things that until now we had to do manually.Checklist:
- [ ] decide on new provider API (RFC: Improve OAuth provider configuration #1846)will address in another PR- [ ] add migration to docswill address in another PRRelated issues:
Closes #1048, closes #1305