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

Backport of Bug Fix: Surface Error for when cookie settings prevent localStorage into release/1.14.x #21665

Conversation

hc-github-team-secure-vault-core
Copy link
Contributor

Backport

This PR is auto-generated from #21503 to be assessed for backporting due to the inclusion of the label backport/1.14.x.

The below text is copied from the body of the original PR.


The new Dismiss License Banner feature uses localStorage. Because the banners are loaded before a user attempts to login, the app was silently failing if a browsers settings did not permit localStorage.

To reproduce:

  1. Under your browsers privacy settings select "block all cookies".
    image
  2. Load the app.

Before the Dismiss license banners work we caught this error on login and surfaced it in the Login container. While the app still didn't work, it didn't silently fail on first load.

This fix shows the DomException error thrown and appends a small clarifying message afterwards. I didn't want to add a lot of custom logic to the error.hbs template for this one scenario, so it's pretty simple.

Note the error that is thrown is readOnly. Here are the MDN docs on the three params returned.

image


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/ui/VAULT-17601/check-local-storage-supported/explicitly-loved-mantis branch from c57c1ff to 17839be Compare July 7, 2023 16:21
@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/ui/VAULT-17601/check-local-storage-supported/explicitly-loved-mantis branch from 1efe2c0 to b128566 Compare July 7, 2023 16:21
@Monkeychip Monkeychip added this to the 1.14.1 milestone Jul 7, 2023
@Monkeychip Monkeychip added ui bug Used to indicate a potential bug labels Jul 7, 2023
@Monkeychip Monkeychip enabled auto-merge (squash) July 7, 2023 16:55
@Monkeychip Monkeychip merged commit bc93062 into release/1.14.x Jul 7, 2023
49 of 50 checks passed
@Monkeychip Monkeychip deleted the backport/ui/VAULT-17601/check-local-storage-supported/explicitly-loved-mantis branch July 7, 2023 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants