0

I am working on a Chrome extension with a popup. This popup contains a login screen.

I would like to add to this screen an autologin checkbox, so that the user doesn't have to type his password every time he closes his browser. I read that storing the password in the localStorage is not a good practice.

Do you know what could be the best way to do so?

For example, I am thinking of identifying the browser uniquely (something like a browser id), and storing it on my server. Does such an id exist?

Otherwise, do you have any idea of how I can do it properly?

Thank you!

4br3mm0rd
  • 543
  • 3
  • 26
  • When I type a password in the popup of my chrome extension, it does not ask me if I want to store it.. Do I need to enable something? – 4br3mm0rd Jul 11 '16 at 13:12
  • i missread the question i thought u wanted to build an auto login extension... you can give the browser an unuqie id yourself. and store that. – Roland Starke Jul 11 '16 at 13:16
  • Yes but the problem with this is that anyone who gets this ID can log into the user's account (so it's like saving the password in the localStorage). How can I link the ID and the browser in a unique way? – 4br3mm0rd Jul 12 '16 at 08:26
  • Thats how sessions work: http://stackoverflow.com/questions/3804209/what-are-sessions-how-do-they-work – Roland Starke Jul 12 '16 at 08:41
  • Yes, but sessions are killed at the end of navigation no? That's why this approach is interesting in the case of session (because it is volatile). Here I want a persistent variable.. – 4br3mm0rd Jul 12 '16 at 08:47
  • Sessions life as long as the client knows the sessionId (mostly stored in a cookie) and the server does not delete the sessiondata. so it could be forever. – Roland Starke Jul 12 '16 at 08:52

0 Answers0