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

UI/fix safari oidc login #11884

Merged
merged 10 commits into from
Jun 17, 2021
Merged

UI/fix safari oidc login #11884

merged 10 commits into from
Jun 17, 2021

Conversation

hashishaw
Copy link
Collaborator

Due to a Safari localStorage bug, logging into Vault with OIDC was not working because the login tab never saw the localStorage write from the popup tab. To resolve, we are replacing localStorage in this scenario with a postMessage call between the two tabs.

Before:
safari-before

After:
safari-after

@hashishaw hashishaw added ui backport bug Used to indicate a potential bug labels Jun 17, 2021
@hashishaw hashishaw added this to the 1.6.6 milestone Jun 17, 2021
});

test('oidc: storage event fires with state key, wrong params', async function(assert) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed this test because we don't fire en event

@@ -55,7 +55,7 @@
@roleName={{this.roleName}}
@selectedAuthType={{this.selectedAuthBackend.type}}
@selectedAuthPath={{or this.customPath this.selectedAuthBackend.id}}
@disabled={{authenticate.isRunning}}
@disabled={{or authenticate.isRunning this.isLoading}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added this because once the popup is closed, while things are processing but before authenticate runs, the button is clickable again and it was confusing

Copy link
Contributor

Choose a reason for hiding this comment

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

Smart

Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

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

Code looks good! Two comments: changelog and I just want to confirm that this works fine on other browsers.

@vercel vercel bot temporarily deployed to Preview – vault-storybook June 17, 2021 16:22 Inactive
@vercel vercel bot temporarily deployed to Preview – vault June 17, 2021 16:22 Inactive
Copy link
Contributor

@picatz picatz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@hashishaw hashishaw merged commit c2584f8 into master Jun 17, 2021
@hashishaw hashishaw deleted the ui/fix-safari-oidc-login branch June 17, 2021 20:56
hashishaw added a commit that referenced this pull request Jun 18, 2021
* use window.postMessage instead of localStorage on oidc callback
hashishaw added a commit that referenced this pull request Jun 21, 2021
* use window.postMessage instead of localStorage on oidc callback
hashishaw added a commit that referenced this pull request Jun 22, 2021
* use window.postMessage instead of localStorage on oidc callback
hashishaw added a commit that referenced this pull request Jun 22, 2021
* use window.postMessage instead of localStorage on oidc callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants