Closed jandudulski closed 11 years ago
Why you mention devise specifically?
Sure, it's not just about devise. But I mention it because I've seen a lot of times that dev was switching default :delete
to :get
just in devise.
I have mixed feelings.
I know it's against best practices (there is a change of state, so it should not be GET), but it's convenient for the users who somehow manage to send GET on the sign out link. Showing them 401 seems wrong.
I would write avoid. Enabling GET for devise is not so bad, but for resources it is for security reasons.
:+1: @sheerun
@jandudulski
PR added.
I know that using POST/DELETE for sign out action is kind of PITA but you don't want your users to be automagically signed out, do you?
Every action which changes the state of application should use CSRF token, including sign out. Homakov describes the problem on his blogpost.
/cc @teamon @sheerun @Ostrzy @chytreg @jcieslar @szajbus