fnakstad / angular-client-side-auth

One way to implement authentication/authorization in Angular applications
http://angular-client-side-auth.herokuapp.com/
MIT License
1.63k stars 346 forks source link

Chrome does not ask to save login credentials #58

Open EleventyOne opened 10 years ago

EleventyOne commented 10 years ago

Using your authorization system, I am asked to save my username/pwd on FF. However, on Chrome, this is not the case.

Popular solutions to this problem for ajax-based logins utilize a hidden iframe (e.g., https://gist.github.com/kostiklv/968927) but that does not prevent the page from being reloaded, which defeats the whole purpose of an SPA.

I would be very interested to hear your thoughts on how to address this issue - it seems very odd to me that Chrome, developed by the same company that made AngularJS, doesn't play well with SPAs in this regard.

mkurz commented 10 years ago

There is a bug for Chromium/Chrome: https://code.google.com/p/chromium/issues/detail?id=282488 Hopefully it will get attention soon by the Chromium dev team.

fnakstad commented 10 years ago

Yea, seems to be a Chromium/Chrome bug judging from the discussion surrounding this (of which both of you guys seem to have partaken in :). I want to avoid adding an elaborate and hacky workaround for this, so I suggest we hold tight for a little longer at least till we get a response to the bug report that was submitted.

mkurz commented 10 years ago

Actually the Chromium bug was reported by an Chromium project member itself, so maybe chances are high that this Chromium developer will start to work on it some time (hopefully soon).

gh-naylor commented 10 years ago

I'm pretty sure this problem is beyond the scope of this repo, or even Chrome, but rather angular itself. I've only skimmed this page, but it might be the solution you're looking for http://timothy.userapp.io/post/63412334209/form-autocomplete-and-remember-password-with-angularjs

fnakstad commented 10 years ago

Yea, seems like that article describes the same problem as in the bug report submitted to the Chromium project. And the fix doesn't seem to be specific to the Angular.js framework, but rather an elaborate workaround to "mock" a traditional form submission to trigger the Chrome autocomplete prompt.

I still think it's best to wait and see if the bug report actually gets resolved first. Seems there are big chances of this being resolved since a Chromium team member actually submitted the report as @mkurz said.

mkurz commented 10 years ago

I just found out there is another Chromium bug report which is getting lots of attention: https://code.google.com/p/chromium/issues/detail?id=43219 It seems a fix isn't that far away ;)

fnakstad commented 10 years ago

Excellent! I guess we'll just hang tight for the moment.

austinpray commented 10 years ago

Anybody figure out a workaround?

maor110 commented 10 years ago

my solution for chrome 35.0, firefox 30.0, angular 1.2.18 (loginpage with passwordmanager, autofill, angularmethod and redirect): http://stackoverflow.com/a/24569358/3619657

austinpray commented 10 years ago

Here is the new Chromium issue: https://code.google.com/p/chromium/issues/detail?id=357696#makechanges

Please star it so it gains traction

ee0pdt commented 10 years ago

Added a star, we probably need a few more!

mkurz commented 8 years ago

This has finally been fixed in Chrome 46! :tada: No iframe hacks anymore!

Check out this example with descriptions.

If you are interested there are further examples in this repo. You can run it with node: node server.js. Maybe also see the comments from this commit: https://github.com/mkurz/ajax-login/commit/c0d9503c1d2a6a3a052f337b8cad2259033b1a58)

If you need help let me know.

mkurz commented 8 years ago

@fnakstad I think this issue can be closed.

austinpray commented 8 years ago

Yeah works for me now