Allow PKCE auth flow to preserve the user's current path to match Dex return_url capaility #20111
Labels
component:auth
component:sso
Issues related to Argo CD configurations
component:ui
User interfaces bugs and enhancements
enhancement
New feature or request
Summary
What change you think needs making.
The current PKCE auth flow will redirect to the authentication provider and return back to 'pkce/verify' which then calls pkceCallback and redirects the user back to '/applications' regardless of what path the user was previously at.
in ui/src/app/login/components/utils.ts
This does not save the place of the user like the Dex auth flow where the return url is sent as a query param to Dex to return the user to after sso auth.
in ui/src/app/login/components/login.tsx
To make the two auth flows a similar user experience, the PKCE auth flow should return the user to their previous path like the Dex auth flow does.
Motivation
Please give examples of your use case, e.g. when would you use this.
This would be used in any PKCE auth flow setup for SSO for ArgoCD.
Proposal
How do you think this should be implemented?
I think the simplest way to achieve this is by caching the return url as a cookie in the pkceLogin function and reading back the cached path in the pkceCallback function which will then clean up the return url cookie or send the user to '/applications' if no return url cookie is present.
This would be similar to how the ID token is cached as a cookie after the pkce auth flow.
The text was updated successfully, but these errors were encountered: