I'm manually signing in my users ( a la: sign_in(user) ) because they are being authenticated via a 3rd party API (using OmniAuth).
However, doing this, my user only stays logged in for like 30 seconds (verifying with user_signed_in?(user) -- current_user still holds the signed in user ).
Is there somethi开发者_StackOverflowng I need to do to keep user_signed_in?() from returning false soon after signing in the user?
Thank you for any help.
Take a look at Devise::Models::Timeoutable documentation.
Found the answer on SO here
For whatever reason, the default rails.js killed the session whenever a .js call was made. The solution is to update rails.js (from here).
精彩评论