IE won't start session from an iframe?

时光毁灭记忆、已成空白 提交于 2020-03-22 08:14:06

问题


The task was to bypass login form on remote server with a session_id acquired through a call to server's web API. So that user wouldn't have to login twice.

Since there's no way to set cookies for different domain. What we came up to was - put a little file on remote server, to which we pass encrypted session_id from hidden iframe and which is supposed to start a proper session for a remote app, which is then loaded in another iframe.

This approach works fine in FF/Chrome, but not IE... However if I copy url to self-made remote authorization script from iframe's src attribute to IE's address bar and load it from there, session get's created as expected. But for some reason it just doesn't want to do the same from an iframe.

Does anyone have any clue, why this is happening?


回答1:


I just ran into the same problem and solved it by setting the time on the server serving the iframe to the time of the server that contains the iframe.




回答2:


Ok, what we did for IEs, we just redirect the whole browser to the authorization script, which then redirects it back again. At least that resolves a problem, somehow.

Anyone having any better solution?



来源:https://stackoverflow.com/questions/2616425/ie-wont-start-session-from-an-iframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!