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 - allow web3 to work in iframes with third party cookies turned off #2203

Merged
merged 1 commit into from
Jan 21, 2019
Merged

Fix - allow web3 to work in iframes with third party cookies turned off #2203

merged 1 commit into from
Jan 21, 2019

Conversation

joshstevens19
Copy link
Contributor

@joshstevens19 joshstevens19 commented Jan 21, 2019

At the moment if you iframe in a website which uses web3 and has third party cookies turned off (safari by default has this) web3 lib throws security generic exceptions. This is due to trying to access the localStorage context when third party cookies are off.

I have now allowed web3 to run as it would if third party cookies are on minus saving stuff to local storage. It will just allow the code to just work and mask the security error. I have made it so it looks for the security code so it wont affect general errors being throw for the developer.

We should be supporting web3 to work in any zone especially in iframes as we discussed on telegram.

Thanks
Josh

@nivida nivida merged commit d516d5e into web3:ethereumProvider Jan 21, 2019
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 92.765% when pulling 000c68b on joshstevens19:fix/allow-web3-to-work-in-iframes-with-3rd-party-cookies-turned-off into 7c641fc on ethereum:ethereumProvider.

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.

3 participants