sreid
unread,Apr 22, 2012, 12:31:56 PM4/22/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Devise
I found a (minor) issue with devise when writing some integration
tests.
- try to read an authenticated page : page1
- redirected to sign_in page, but don't sign_in
- read public (non-authenticated) page : page2
- sign_in
- redirected to page1 not page2
I tried it manually in the browser too, and got the same result.
I think it's related to the session variable "user_return_to" which is
updated by store_location! in failure_app.rb. I suspect
it only updates "user_return_to" after a failed attempt to access an
authenticated page.
This means after sign_in, the user is redirected to the last page he
failed to access, not the last page he accessed.
Is this how devise is intended to work ? If yes, how would I override
it ?