Skip to content

Questions about security, CSP, localstorage #110

Answered by ThexXTURBOXx
adrian-moisa asked this question in Q&A
Discussion options

You must be logged in to vote

Now my question is the following: I tried to switch to _self for UX reasons. What is happening is auth.html fallbacks to transfering the tokens after redirect via localstorage.
I see that switchign back to _blank no longer produces tokens that linger around in the store.

The local storage approach is chosen when the other approaches would fail - it acts as a workaround, basically.
In many modern browser, window.opener is set to null when opening new tabs in specific ways to prevent tabnabbing attacks.
And the same way window.parent might be reset to null.
If both are set to null (or for some reason window.parent is invalid), authentication is using postMessage is not possible anymore.
f…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@adrian-moisa
Comment options

Answer selected by ThexXTURBOXx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants