Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log out via POST request #303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Log out via POST request #303

wants to merge 1 commit into from

Conversation

hnatt
Copy link

@hnatt hnatt commented Oct 9, 2015

Fixes #302

This is a breaking change since many users probably have overriden the view files, so I'm not sure this needs to be introduced to stable branches.

@JDutil
Copy link
Member

JDutil commented Oct 13, 2015

Why not destroy?

@hnatt
Copy link
Author

hnatt commented Oct 14, 2015

I thought "destroy" and other fancy verbs are only for RESTful routes.

@JDutil
Copy link
Member

JDutil commented Oct 14, 2015

Sorry should be method DELETE. Like: <%= link_to 'Sign out', destroy_user_session_path, method: :delete %>

@hnatt
Copy link
Author

hnatt commented Oct 15, 2015

"DELETE /logout" request does not make much sense. Like "logout" is a resource and we're deleting it. Should I make all routing RESTful? Or just make this "DELETE /logout" thing?

Be it POST or DELETE (which also will be simulated with a POST in browsers) does not matter in regard to CSRF.

@kushniryb
Copy link
Contributor

@damianlegawiec @bbonislawski
What do you think about it? It seems like a breaking change to a lot of users so I'm not sure whether it's a smart move to merge it.
DELETE makes much more sense than GET to me though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants