-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat: rename protection
to checks
#2255
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nextauthjs/next-auth/HhbvagDhw81s3QHKCfbeamzwJ562 |
Codecov Report
@@ Coverage Diff @@
## next #2255 +/- ##
==========================================
+ Coverage 10.74% 10.78% +0.03%
==========================================
Files 83 83
Lines 1414 1409 -5
Branches 393 389 -4
==========================================
Hits 152 152
Misses 1042 1042
+ Partials 220 215 -5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 💚
This change aligns the API with `openid-client`'s `checks` https://github.com/panva/node-openid-client/blob/main/docs/README.md#clientcallbackredirecturi-parameters-checks-extras, a library which we intend to migrate to in the future. Aligning our API early, so people get used to it. Also, objectively the name `protection` might not have been as clear as I first thought. `checks` better describe the intention. BREAKING CHANGE: The `state` option on OAuth providers is now deprecated. Use `checks: ["state"]` instead. `protections` is renamed to `checks`, here is an example: ```diff - protection: ["pkce"] + checks: ["pkece"] ``` Furthermore, string values are not supported anymore. This is to be able to handle fewer cases internally. ```diff - checks: "state" + checks: ["state"] ```
This will better align with
openid-client
'schecks
https://github.com/panva/node-openid-client/blob/main/docs/README.md#clientcallbackredirecturi-parameters-checks-extras, a library which we intend to migrate to in the future. Aligning our API early, so people get used to it.Also, objectively the name
protection
might not have been as clear as I first thought.checks
better describes the intention.BREAKING CHANGE:
The
state
option on OAuth providers is now deprecated. Usechecks: ["state"]
instead.protections
is renamed tochecks
, here is an example:Furthermore, string values are not supported anymore. This is to be able to handle fewer cases internally.