sahat / satellizer

Token-based AngularJS Authentication
https://satellizer-sahat.rhcloud.com
MIT License
7.85k stars 1.13k forks source link

IE support #24

Closed bslipek closed 10 years ago

bslipek commented 10 years ago

Do Satelizer support IE ? Because i have problem when try to authorize on IE (11,10 or 9), after log-in in provider window the pop-up close and nothing else happend, user is still not log-in.

bslipek commented 10 years ago

probably problem is in $window.opener

bslipek commented 10 years ago

my research say that when pop-up window call window.opener.postMessage() its parent never receive this message.... so ?code= is never pass to parent window.

sahat commented 10 years ago

@bslipek I don't this it supports IE yet (have not tested) possibly due to http://stackoverflow.com/questions/16226924/is-cross-origin-postmessage-broken-in-ie10 and http://stackoverflow.com/questions/4885765/window-opener-alternatives.

I will see if I can get a workaround for that to have Satellizer working with IE9 and above at the very least.

bslipek commented 10 years ago

very well :) currently i am working on it also, maybe i will help you :)

bslipek commented 10 years ago

Internet Explorer 8+ partially supports cross-document messaging: it currently works with iframes, but not new windows. this is it....

sahat commented 10 years ago

@lynndylanhurley were you able to solve this IE problem by any chance with your module?

lynndylanhurley commented 10 years ago

@sahat, @bslipek - IE9 and below will not support postMessage for the purposes of this project.

For IE8 and IE9, ng-token-auth authenticates using a hard redirect to the OAuth provider. The auth data (token, user id, etc.) are passed back to the client via GET params.

I don't believe there's a solution to this outside of a postMessage polyfill, but please let me know if you come across anything.

sahat commented 10 years ago

After spending most of the day trying to get Satellizer to work with Internet Explorer [:gun:] , I give up. If someone would like to contribute a pull request or offer some kind of workaround I would greatly appreciate it. Until then I am leaving this issue open.

lynndylanhurley commented 10 years ago

There's a section devoted to these problems in the ng-token-auth readme if you're interested: https://github.com/lynndylanhurley/ng-token-auth#ie8-and-ie9

sahat commented 10 years ago

Thank you @lynndylanhurley, I will take a look at it later; there is only so much of IE I can handle in a day.

wgoolsby commented 10 years ago

Any updates on this issue?

sahat commented 10 years ago

Not yet @wgoolsby.

sahat commented 10 years ago

I've made some progress towards IE support. After trying just about every solution available I was about to give up until I read somewhere that Internet Explorer runs in Protected Mode on localhost which explains why window.opener always returns null.

It works fine if I map localhost to something like myhost.com in etc/hosts.

Kamahl19 commented 10 years ago

Hi,

so will this work for IE9+ when not on localhost? I am developing my first angular app and I need token auth, so if it works for IE9 I would like to use this one. Thanks

sahat commented 10 years ago

Yea @kamahl19 it should work. I'll update this thread as soon as I have any results.

sahat commented 10 years ago

Great news, I got IE browsers to work. I'll push an update later today.

oobleck commented 10 years ago

Bleeding edge stuff right here. I was about to walk away from this module based on the browser support in README, but am really glad I saw this thread. Nice work guys!

sahat commented 10 years ago

Everyone, take a look at https://satellizer.herokuapp.com. It should work in IE9 and above. Perhaps it will work in IE8 as well, but I will need to downgrade to AngularJS 1.2.x to test that out. I am no longer using postMessage to communicate between main window and popup so technically it should work even in IE8.

I have tested it out in IE9 and IE11 so far and works without any issues. Meanwhile Firefox and Chrome work even better than before: the popup is closed almost immediately so you should not see the main page loading in the popup anymore.

jshemas commented 10 years ago

Hello! Great work so far! Looks like there may be some more problems in IE8 still. One them seems to be a problem with using .catch .

I found a SO post that seems to fix it: http://stackoverflow.com/questions/23105089/angular-q-catch-method-fails-in-ie8

sahat commented 10 years ago

sahat commented 10 years ago

That was an easy fix at least https://github.com/sahat/satellizer/commit/da7c9bcf26b8e33d35cf84522dde950b14732e32 .

sahat commented 10 years ago

I am going to close this issue now now that Satellizer supports IE in v0.7. If you run into IE-related issues feel free to re-open this issue.

jgentes commented 9 years ago

I'm seeing this with 0.8.7 and IE 11.. the popup window doesn't close during auth. Works fine with Chrome and FF. :(

sahat commented 9 years ago

@jgentes are you running into this issue locally or in production? For local development, you have to disable IE Protected Mode.

jgentes commented 9 years ago

Its running in Heroku, so not a local host. Does it work on your Heroku test box?

-James

On Dec 17, 2014, at 7:00 PM, Sahat Yalkabov notifications@github.com wrote:

@jgentes are you running into this issue locally or in production? For local development, you have to disable IE Protected Mode.

— Reply to this email directly or view it on GitHub.

jgentes commented 9 years ago

I think this is actually an issue in my browser, although I'm not sure what it is yet.

jgentes commented 9 years ago

FYI - as it turns out, I had two different versions of satellizer.

One version was configured in package.json for Node, and the other was in bower.json for Angular. Satellizer in Angular was old, so once I updated it the problem went away. It was confusing because I thought I was up to date when I was looking at my package.json file.

arterzatij commented 9 years ago

may be this is a related issue, some of yours comments looks like my issue. Using localhost on IE.

https://github.com/sahat/satellizer/issues/349

prashantmishraimpinge commented 9 years ago

Hi Sahat,

I am following this conversation and used code that pushed to Github https://github.com/sahat/satellizer/releases/tag/0.7.0

I am having issues with FB app's in-app browser. It doesn't let my facebook login working properly.

Any guess?

Thanks in advance.

Raviteja157527 commented 8 years ago

Hi Sahat,

I am having problem in IE 11. Popup doesn't close after login. I am using version 0.14.0 satellizer js.

Facebook, twitter and linkedin have same problem in IE. It works fine in safari, FF and Chrome

Please let me knaw if i am doing any wrong in implementing the code.

this the file i am using apart from satellizer.js

Popup opens and URL is displayed below.

https://oapuat.icicibank.com/?code=AQRQfjqP2RHo_dCNCAMnwiuSPwEcHRv4GnQlrcfIOnsxJlqZAPxyW36_ivuBluEXzydvNJUqAE_vJIiyKpk0CgEFcTfl4uQmpSdsbw46RDb-zrF4oqU&state=STATE

socialMediaConfig.zip

Thanks Raviteja