Results 1 to 2 of 2

Thread: Remember Me!

  1. #1
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450
    Answers
    3997

    Default Remember Me!

    Hate having to log in each time you restart your browser? The session lives for the browser session so if you close the browser, you are effectively logged out.

    I pushed an update last night for something else for internal use but a change that was already queued up got to tag along for the ride and that is the ability for remember me. So now when you reopen the browser, you should still be logged in. Win!

    But I wanted to give some more details on how it works. I've seen some sites save my username and even a hashed password which isn't very secure. md5 a password isn't enough to protect it. The way I'm doing it is I create a secure hash (which isn't based on username or password) and that is what is saved in the cookie. On the backend, I match that hash with the forum account. Further more, a hash only lives for one usage. So if you refresh the browser the app will send a check to see if a user is logged in and of course the cookie goes along for the ride. It will then die and a new one is created.

    So enjoy never logging in again! Well, unless you uncheck the checkbox or have cookies disabled or go to a new computer or a new browser or open private mode on your browser.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  2. #2
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Answers
    32

    Default

    Awesome!
    Before pasting your code, see if you can make a working example using Sencha Fiddle: https://fiddle.sencha.com/

    Not only will it let everyone see what you're talking about with their own eyes, but it also makes debugging your issue 19 billion times easier

    Embedding your newly created Fiddle is super-easy: Using Sencha Fiddle in the Forums

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •