don't ask for credentials on timeout

35 views
Skip to first unread message

thoughtafter

unread,
Feb 12, 2011, 8:14:25 PM2/12/11
to Devise
I've been playing with timeoutable. I'm not sure the default behavior
is what I desire. The default seems to be when the user is signed
out, on their next request have them revalidate their credentials. I
would prefer thir next request to simply be unauthenticated, if the
request requires authentication then they should see the sign in
screen, otherwise they should be allowed to continue without
interruption. How can I implement this?

José Valim

unread,
Feb 13, 2011, 10:06:30 AM2/13/11
to Devise
In theory, Devise should behave as you say. The time out code is just
invoked if you try to access the current user or require
authentication. Therefore, a simple call to current_user may trigger
the timeout. Maybe you shuold be using something like user_signed_in?
before accessing the current_user directly.
Reply all
Reply to author
Forward
0 new messages