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

Remove global.localStorage call in paho-mqtt file for incognito mode #582

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove global.localStorage call in paho-mqtt file for incognito mode #582

wants to merge 1 commit into from

Conversation

ekarious
Copy link

@ekarious ekarious commented Aug 6, 2020

What was the problem ?

paho-mqtt.js was using the code global.localStorage.

In Private navigation (aka incognito mode), cookies are by default blocked for third party. The fallback was to use localStorage but this file is attaching localStorage to global and access to the global window is forbidden which resulted in an error.

DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document

Why this modification:

Remove this little piece of code will allow aws-appsync to be correctly used even in private navigation.

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.

1 participant