-
-
Notifications
You must be signed in to change notification settings - Fork 970
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: add support for state param for OAuth2 Authorization Code flow #2330
Conversation
Github issue: #2275 |
f5ca264
to
42ab29d
Compare
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.
Besides the issues in this review, I think it's currenlty possible to pass user provided state parameter by simply including it in the auth url. For that reason I believe merging #2114 should take precedence over this one.
@@ -37,6 +37,7 @@ const OAuth2AuthorizationCode = ({ collection }) => { | |||
clientId, | |||
clientSecret, | |||
scope, | |||
state, |
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.
Should probably be also reset in handlePKCEToggle
below.
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.
and declared above as well as in inputsConfig.js
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.
Fixed both reviews, thank for pointing out @pietrygamat
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.
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.
@lohxt1 added in spread.
@lohxt1 Assigning this to you Lets make it a priority to have this merged early next week. |
b94bb26
to
a1eb80f
Compare
a1eb80f
to
9a8d710
Compare
Fixed reviews! Feel free to take a look |
Let me know if any more changes are needed to this PR @lohxt1 |
@@ -37,6 +37,7 @@ const OAuth2AuthorizationCode = ({ item, collection }) => { | |||
accessTokenUrl, | |||
clientId, | |||
clientSecret, | |||
state, |
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.
can you also add the state prop inside the updateAuth dispatch fn of handlePKCEToggle
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.
right missed that, added now
Merged! Thanks @dhananjaykadam for working on this! This will go out next Tuesday, June 4th 2024. |
Issue Reference
#2275
Description
Adding support for
state
param which is expected on OAuth2 authorization code flowContribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.