We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using jToker alongside devise_token_auth, nothing but standard.
I can't logout using $.auth.signOut(). I got a 404 in the console, and when I curl the request I get
$.auth.signOut()
"errors":["User was not found or was not logged in."]
I found this SO post
http://stackoverflow.com/questions/32507637/why-am-i-unable-to-sign-out-using-devise-token-auth-and-curl
but I can't succeed with this method, and I think that jToker documentation is missing something or outdated.
The text was updated successfully, but these errors were encountered:
I found the solution in @kunovski answer to this issue : #7
it was a problem of CORS configuration (server-side pb). I quote his answer:
You should do this:
Rails.application.config.middleware.insert_before 0, Rack::Cors do allow do origins 'example.com' resource '*', headers: :any, methods: [:get, :post, :put, :patch, :delete, :options, :head] end end
Instead of:
Rails.application.config.middleware.insert_before 0, Rack::Cors do allow do origins 'example.com' resource '*', headers: :any, expose: ['access-token', 'token-type', 'client', 'expiry', 'uid'], methods: [:get, :post, :put, :patch, :delete, :options, :head] end end
Sorry, something went wrong.
You still need expose: ['access-token', 'token-type', 'client', 'expiry', 'uid'] in there
expose: ['access-token', 'token-type', 'client', 'expiry', 'uid']
No branches or pull requests
I'm using jToker alongside devise_token_auth, nothing but standard.
I can't logout using
$.auth.signOut()
. I got a 404 in the console, and when I curl the request I get"errors":["User was not found or was not logged in."]
I found this SO post
http://stackoverflow.com/questions/32507637/why-am-i-unable-to-sign-out-using-devise-token-auth-and-curl
but I can't succeed with this method, and I think that jToker documentation is missing something or outdated.
The text was updated successfully, but these errors were encountered: