lundi 4 mai 2015

using devise for autologin using session without using Remember Me -Rails 3.2

i am using latest devise gem to authenticate and authorize user.Now i want to autologin any user who has logged(without using remember me) in earlier on same browser which can be done using session and storing session in the cookie.This is what i am supposed to do:-

  1. i have included cookie.js
  2. Now i will set a user_session after login and set this session in the cookie
  3. And i will check it every time before creating a new session/Before login

So i am going right or missing something??how can i go ahead with this plan?Any other better option.??

Aucun commentaire:

Enregistrer un commentaire