-
Notifications
You must be signed in to change notification settings - Fork 42
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
Session is not restored properly inside of an iframe #2016
Comments
I just realized this isn't the source of my problem because Cypress is rewriting the In any case, I think this could still be an issue in some use-case so I'll leave this open. Feel free to close it if you think that use-case (running apps inside iframes) shouldn't be supported. |
I'll have to think twice about it, but I'm afraid running the app in an iframe could be hard to support, at least until we support popup-based login. In the case of a redirection login, many identity providers have content security policies preventing running into iframes to prevent certain attacks. However, the reason why we were dealing with |
Thanks for the response. After a while I realized this wasn't the root of my problem because Cypress is faking not being inside of an iframe, so it does work. I'm still not sure what was causing this to happen sparingly, but I'm sure it has nothing to do with the library. So I don't really have any issues now, I just let this open in case it was a problem for someone else. But if you think running apps inside of an iframe is not within the scope of the library, feel free to close the issue. I don't really have a real use-case at the moment. |
If it were a use case, it would not work with the library as it is built at the moment for the reasons described (shortly) in this issue, so let's keep it open for the time being :) |
Search terms you've used
iframe
Impacted package
Which packages do you think might be impacted by the bug ?
Bug description
An app running inside of an iframe won't restore the session properly, because the callback url is sent to the parent window instead.
To Reproduce
It would take me some time to create a small reproduction, and I think the issue is clear enough. It it isn't, let me know and I'll provide the reproduction.
Expected result
I expect the library to restore the session properly even if running inside of an iframe.
Actual result
The library does not restore the session properly and sends the callback url to the parent window.
Environment
I don't think my environment is relevant to this issue.
Additional information
So far you may be wondering why do I even need to run the library inside of an iframe. Well, there is a perfectly good explanation, and that is that I use Cypress :). Cypress is an automated test framework that runs tests in a real browser, and the app is run within an iframe.
So this is not a problem that I will face in production, but it's broken my tests and makes it impossible to use in my development workflow. Although I could see this becoming an issue for some app that does run in an iframe.
The text was updated successfully, but these errors were encountered: