Fix PubNub in iframe with 3rd party cookies disabled#35
Fix PubNub in iframe with 3rd party cookies disabled#35jessepollak wants to merge 2 commits intopubnub:masterpubnub/javascript:masterfrom jessepollak:fix-iframe-cookie-issuejessepollak/javascript:fix-iframe-cookie-issueCopy head branch name to clipboard
Conversation
…ded iframe in a browser with 3rd party cookies disabled
|
this is a good fix, not a good implementation - but we need to add it to the |
|
Happy to move it there when I'm back at my computer.
|
|
Done. |
|
Thanks @jessepollak, we'll get this into our next JS release! |
|
We are running into this problem again - it seems like the logic that was proposed here got reverted to something that fails completely in iframes with 3rd party cookies disabled. Do y'all have any suggestion for how to handle this? |
|
@jessepollak hey Jesse, are you targeting v3 or v4 of the SDK? |
|
I'm targeting v3. It looks like the "modern" version of the SDK (which I've realized is the only one available via npm) is doesn't have the v4 has no |
|
@jessepollak let me double check on that regression; I'll cut a version for both |
|
@MaxPresman thank you very much for the quick response! |
|
Hi @MaxPresman just wanted to follow up here - are you still planning on shipping a new version today? |
|
@jessepollak the V4 is going through the deploy pipeline and V3 is coming up next; I am hoping within the next hour. |
|
Thank you! On Thu, Aug 25, 2016 at 1:03 PM Max Presman notifications@github.com
|
|
@jessepollak all ready, |
|
thanks so much! |
If PubNub is used in an iframe with 3rd party cookies disabled, it currently throws the following error:
Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.To fix this, we wrap the access of the
localStorageobject in a try/catch and polyfill if necessary.