-
Notifications
You must be signed in to change notification settings - Fork 1
Fix login loop from logout redirect #1252
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
Conversation
Bundle sizes [mpdx-react]Compared against ff0441a No significant changes found |
canac
left a comment
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.
The code looks good to break the redirect loop, but when I click the sign out button, it takes me to an Okta login page. Is it doing that for you?
|
I think you also need to change all the |
|
Preview branch generated at https://fix-logout-redirect.d3dytjb8adxkk5.amplifyapp.com |
It only takes you to the Okta sign-in page on localhost; on staging, it works as expected. |
We need to keep the src/components/Reports/HealthIndicatorReport/HealthIndicatorReport.tsx Line 270 - 283 |
canac
left a comment
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.
It only takes you to the Okta sign-in page on localhost; on staging, it works as expected.
On local, mine has always taken me to the Okta page on signout.
It would be nice to know why localhost behaves differently, but that's not urgent.
We need to keep the
{callbackUrl: 'signOut'}on thesignOut()function as this is how we know we should redirect it to Okta to sign out of all sessions.
Thanks, I missed that part of the code and thought it was just an invalid URL.
|
I believe the reason is that Okta doesn't know how to redirect back to localhost, but I could be wrong. We run the same code, but Okta doesn't redirect us back to MPDX on local. |
Description
This PR fixes the error where users find themselves in an endless loop on the login screen. When you are logged out after a certain amount of time, you are redirected to the homepage with the redirect of
/logout, which, once you log in, you will be automatically logged out.This PR prevents the redirect for the logout page from being added to the login redirect.
Checklist: