fix: Use full page navigation for OIDC logout instead of AJAX fetch (#7083)#7379
Conversation
…pendatahub-io#7083) The dashboard used fetch('/oauth2/sign_out') (AJAX) to trigger logout. When kube-auth-proxy responds with a 302 redirect to the IdP's end_session_endpoint (e.g. Microsoft Entra ID), the browser blocks the cross-origin redirect due to CORS policy. This prevents the IdP session from being terminated, causing immediate re-authentication. Replace fetch() with window.location.href to perform a full page navigation, allowing the browser to follow the 302 redirect chain to the IdP logout page and back. Signed-off-by: Gowtham Shanmugasundaram <gshanmug@redhat.com> Co-authored-by: Manaswini Das <dasmanaswini10@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
8316555
into
opendatahub-io:v3.3.0-fixes
The dashboard used fetch('/oauth2/sign_out') (AJAX) to trigger logout. When kube-auth-proxy responds with a 302 redirect to the IdP's end_session_endpoint (e.g. Microsoft Entra ID), the browser blocks the cross-origin redirect due to CORS policy. This prevents the IdP session from being terminated, causing immediate re-authentication.
Replace fetch() with window.location.href to perform a full page navigation, allowing the browser to follow the 302 redirect chain to the IdP logout page and back.
Description
How Has This Been Tested?
Test Impact
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main