Login support for browser password managers


(Neil Lalonde) #1

Continuing the discussion from Alternative (non-ajax) way to login, so that browser password manager can save the login credentials:


Since Discourse’s login form was being rendered only when you click the login button, browsers weren’t asking to save your password. They only see forms that are rendered on page load.

I got this working in all browsers except IE (of course!). IE is so close to working, there must be a little trick I’m missing.

So, give it a try everyone!

http://try.discourse.org

Please report what you find in different browsers on different OS’s. And if you know how to get this to work in IE I will love you forever possibly!

Something I learned is that Firefox does this so much more reliably than any other browser. Every implementation I tried worked in Firefox. “Does this work in Firefox? Yes, of course it does.” Chrome and Safari are better, but each have their own quirks, with Safari being very fussy about what it recognizes as a login form and how it expects the form to be submitted.

It’s interesting that Chrome and Safari both use the keychain on OS X, so saving the password in one will save it on both, and Chrome syncing will send it to all your computers.

Save password in Safari → Chrome gets it from keychain → Chrome syncs to your other computers -> Safari on all computers gets it from the keychain.

Sometimes Chrome doesn’t ask to save your password, it just does it.


(Jeff Atwood) #2

Works great for me in Google Chrome (current version, Windows) on try.discourse! Hooray!

Two notes:

  1. You have to formally log in at least one time, the initial new account creation process doesn’t shunt you through the login form.

  2. Chrome incognito mode will not work for testing, in incognito mode no logins are saved, intentionally.


(Jeff Atwood) #3

Also works great in Firefox for Windows on try. So that’s Chrome and Firefox confirmed, which is great!

Did not work in Opera, oddly, though it prompted me, and saves in the password manager config area. It looks like it should work, but does not. Given Opera’s miniscule browser share, probably not a concern.

Definitely no work in IE10. Would be nice if we could get it working in IE10 at least.


(Neil Lalonde) #4

There’s probably a way to get this working.


(Jeff Atwood) #5

I don’t view that as a requirement. There’s a related discussion we could have about the perils of auto-login based on a link, but… another time.


(Jeff Atwood) #6

Confirmed, built in password manager still does not work in IE11 with Discourse.

Should still be OK in Firefox and Chrome at least.


(Jeff Atwood) #7

@techAPJ re-checked this today. Discourse login page “remembered credentials” is verified working in

  • Firefox 36.0.1
  • Chrome 41.0.2272.89
  • Safari 7.0.6 (Mavericks) and 8.0.4 (Yosemite)

Still not quite working on IE though.


(Arpit Jalan) #8

I moved 2 posts to a new topic: Browser password manager on password-reset page not saving correct site location