Skip to content
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

fix(ui): add state parameter in the pkce flow #17235

Merged
merged 2 commits into from
Sep 22, 2024
Merged

Conversation

js3692
Copy link
Contributor

@js3692 js3692 commented Feb 18, 2024

Fixes #17217

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@js3692 js3692 changed the title Add state to pkce flow fix: add state to pkce flow Feb 18, 2024
@js3692 js3692 changed the title fix: add state to pkce flow fix(ui): add state to pkce flow Feb 18, 2024
Copy link

codecov bot commented Feb 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.54%. Comparing base (2077688) to head (8c73d2a).

Current head 8c73d2a differs from pull request most recent head 6a34507

Please upload reports for the commit 6a34507 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #17235      +/-   ##
==========================================
+ Coverage   44.99%   49.54%   +4.55%     
==========================================
  Files         355      273      -82     
  Lines       47931    48288     +357     
==========================================
+ Hits        21565    23925    +2360     
+ Misses      23563    21999    -1564     
+ Partials     2803     2364     -439     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@js3692 js3692 changed the title fix(ui): add state to pkce flow fix(ui): add state parameter in the pkce flow Feb 21, 2024
@js3692 js3692 marked this pull request as ready for review February 21, 2024 16:52
@js3692 js3692 requested a review from a team as a code owner February 21, 2024 16:52
@blakepettersson
Copy link
Member

Hi @js3692!

Could you add unit tests for this? And can you add docs / comments in regards to this (similar to what you did in #17217)?

@js3692
Copy link
Contributor Author

js3692 commented Feb 24, 2024

Hello @blakepettersson! Thanks for the pointers - I was largely going off of the original PR #15889 in terms of tests / docs / comments. I'll see what I can add

@csantanapr
Copy link
Member

Hi @js3692 would be very useful to get this PR merge, if you could you take a look again to the request from @blakepettersson

@js3692
Copy link
Contributor Author

js3692 commented Apr 25, 2024

Argh yes, sry, I'll take another look.

I didn't see any existing tests around this functionality last time. Let me see what makes sense here

@js3692
Copy link
Contributor Author

js3692 commented Apr 29, 2024

Hi @js3692 would be very useful to get this PR merge, if you could you take a look again to the request from @blakepettersson

Hmm, I might be missing something here, but what exactly are you looking for? 😅

I can add some comments in the code, but I can't find any docs or unit tests for the UI. I'd appreciate some pointers.

@blakepettersson
Copy link
Member

Hi @js3692!

Sorry about that - I missed that this was just a UI change (there definitely should be UI tests IMO, but that's another matter and not pertaining to anything you need to do). LGTM 👍

@csantanapr
Copy link
Member

Thank you @blakepettersson for the reply and clarification

What's the next step for the PR to progress?

@amcinnes
Copy link

Is there anything blocking this PR? I'd love to see it merged so I can have the PKCE flow working with Okta - because then I can hopefully have Argo's web UI and CLI both working using one Okta app.

@sidewinder12s
Copy link

@blakepettersson Would you be able to help here?

Copy link
Contributor

@Marvin9 Marvin9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for late response. I have tested it and it works as expected.

You would need to remove the state from session storage after verification. You can add here

Copy link
Contributor

@Marvin9 Marvin9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will raise the followup PR. The changes I requested should not block this long pending PR

Signed-off-by: Jungho Son <js3692@users.noreply.github.com>
@js3692
Copy link
Contributor Author

js3692 commented Sep 22, 2024

Thanks all - almost forgot about this PR 😅. Updated with the unset + made it more consistent with the other state handler.

Signed-off-by: Jungho Son <js3692@users.noreply.github.com>
Copy link
Contributor

@Marvin9 Marvin9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM. Needs an approval from someone with access. @blakepettersson can you please approve or tag relevant user who can approve?

@blakepettersson
Copy link
Member

I don't have the prerequisite powers, but @gdsoumya does 😄

@gdsoumya gdsoumya merged commit 555854c into argoproj:master Sep 22, 2024
22 checks passed
ratulbasak pushed a commit to ratulbasak/argo-cd that referenced this pull request Sep 25, 2024
* Add state to pkce flow

Signed-off-by: Jungho Son <js3692@users.noreply.github.com>

* Call unset

Signed-off-by: Jungho Son <js3692@users.noreply.github.com>

---------

Signed-off-by: Jungho Son <js3692@users.noreply.github.com>
Signed-off-by: ratulbasak <ratulbasak93@gmail.com>
adriananeci pushed a commit to adriananeci/argo-cd that referenced this pull request Dec 4, 2024
* Add state to pkce flow

Signed-off-by: Jungho Son <js3692@users.noreply.github.com>

* Call unset

Signed-off-by: Jungho Son <js3692@users.noreply.github.com>

---------

Signed-off-by: Jungho Son <js3692@users.noreply.github.com>
Signed-off-by: Adrian Aneci <aneci@adobe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

PKCE flow leaves out state required by Okta
8 participants