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

The operation is insecure error on Safari #1793

Open
adrien-constant opened this issue Dec 24, 2024 · 1 comment
Open

The operation is insecure error on Safari #1793

adrien-constant opened this issue Dec 24, 2024 · 1 comment

Comments

@adrien-constant
Copy link

Latest version, with Safari 18.2

The operation is insecure.
OidcClientSettingsStore@https://localhost:3000/static/js/bundle.js:174029:59
UserManagerSettingsStore@https://localhost:3000/static/js/bundle.js:175436:10
UserManager@https://localhost:3000/static/js/bundle.js:175849:49

After digging a bit, it seems default security values of Safari prevent the use of both local storage and session storage :

> localStorage.length
< SecurityError: The operation is insecure.
> sessionStorage.length;
< SecurityError: The operation is insecure.
@life777
Copy link

life777 commented Jan 20, 2025

Hi, this issue present in all browsers. If users turn off persistent data store for the website, browser will throw this error every time you try to access localStorage or sessionStorage:

Exception part: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage#exceptions

Image

The library should catch this error and use InMemoryWebStorage instead.

Thanks a lot

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

No branches or pull requests

2 participants