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 login and logout flow for MCS #185

Merged
merged 1 commit into from
Jun 30, 2020
Merged

Conversation

Alevsk
Copy link
Contributor

@Alevsk Alevsk commented Jun 30, 2020

fixes: #184

There was a bug in Safari in related to the browser not setting the session token
correctly in localstorage, this was because we were using
window.location.href for redirect instead of history.push after login, the redirect execution was faster
was faster that the promise function getting the response after the login request
and it seems to be that Safari will kill all current request of a
window when the page is getting redirected.

Test this:

Try to sign-in using Safari browser (latest version is recommended)

@Alevsk Alevsk self-assigned this Jun 30, 2020
@Alevsk Alevsk force-pushed the fix-login-logout branch from 9e3fa27 to 0654091 Compare June 30, 2020 01:23
fixes: minio#184

There was a bug in Safari in related to the browser not setting the session token
correctly in localstorage, this was because we were using
window.location.href for redirect instead of history.push after login, the redirect execution was faster
was faster that the promise function getting the response after the login request
and it seems to be that Safari will kill all current request of a
window when the page is getting redirected.

Test this:

Try to sign-in using Safari browser (latest version is recommended)
@Alevsk Alevsk force-pushed the fix-login-logout branch from 0654091 to 35bab24 Compare June 30, 2020 01:25
@@ -164,9 +165,7 @@ const Login = ({ classes, userLoggedIn }: ILoginProps) => {
.then(() => {
// We set the state in redux
userLoggedIn(true);
// There is a browser cache issue if we change the policy associated to an account and then logout and history.push("/") after login
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about this dire warning about history.push()?

Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

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

LGTM

@Alevsk Alevsk merged commit 59a5c9d into minio:master Jun 30, 2020
@Alevsk Alevsk deleted the fix-login-logout branch June 30, 2020 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Safari
3 participants