-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
/sign_out route is returning 404 not found #713
Comments
Did you find a solution? if yes, then please share it :D |
I had the same issue and in my case the sign_out request was not sending the auth headers access-token, client, expiry, token-type and uid for sign_out (because of a bug in a tweak I needed to make in the client side). It makes this gem to respond with 404. |
Thanks @tomlobato , I'm struggling with the same issue. Could you explain how did you pass those auth headers? I'm using ng-token-auth -> $auth.signOut() method. |
A test setup to illustrate how this works (to hopefully help some folks) looks something like:
A simple |
How did you @dnlsandiego solve this issue? I am using the same on an ios front end and getting |
I think this issue is due to devise_token_auth sending the logout request as GET but devise expects it as a DELETE method request. In normal Device gem this is configurable with the below code, can I do the same in this library? config.sign_out_via = :get |
From https://stackoverflow.com/questions/32507637/why-am-i-unable-to-sign-out-using-devise-token-auth-and-curl , I found the curl with |
I currently have a Rails 5 app that's in API mode using this gem's version
0.1.37
and for some reason the/sign_out
route is missing and is returning 404 not found but it's present when viewing therake routes
output. The/sign_in
and all other routes work. This also happens even in a fresh Rails 5 app in API mode with the latestdevise_token_auth
gem and version0.1.37
. But in a fresh Rails 5 app that's not in API mode, the/sign_out
route is there but returnsCan't verify CSRF token authenticity.
. Maybe0.1.37
and the latest version is not compatible with the Rails 5 in API mode?Routes definition:
Routes output:
Is there something I'm missing in this setup? or might not be doing that's causing this issue? I can provide a repo that reproduces this issue if that will help.
P.S.
Thanks for this great gem!
The text was updated successfully, but these errors were encountered: