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

making one action in controller use token authentication #233

Closed
ror6ax opened this issue Mar 21, 2016 · 4 comments
Closed

making one action in controller use token authentication #233

ror6ax opened this issue Mar 21, 2016 · 4 comments

Comments

@ror6ax
Copy link

ror6ax commented Mar 21, 2016

Hi, thanks for this amazing gem and all the work!

Could you kindly point what am I doing wrong here?
Before starting to sue token_auth I need to make one action not authenticable by Devise.

skip_before_filter :authenticate_user!, only: [:api, :do_stuff]

But when I request both methods I still get {"error":"You need to sign in or sign up before continuing."}.
Looks like skip method does not work somehow. Any help would be tremendously useful, thnx!

@ror6ax ror6ax changed the title making one action in controller use token authent making one action in controller use token authentication Mar 21, 2016
@ror6ax
Copy link
Author

ror6ax commented Mar 21, 2016

Strangely, it's including acts_as_token_authentication_handler_for that causes this error...

@gonzalo-bulnes
Copy link
Owner

Hello @ror6ax!

This comment provides a list of the basic information I need to get an idea of what can be going wrong. (Please note that knowing which options you're using when enabling the controller to act as a token authentication handler was already provided in that issue, but is necessary too!)

(I take note that the wiki is probably missing a Troubleshooting section.)

Could you please check that and post the answers here?

@gonzalo-bulnes
Copy link
Owner

@ror6ax To make things easier, I documented the information needed for troubleshooting in the wiki. Please see Asking for help for examples. : )

@gonzalo-bulnes
Copy link
Owner

gonzalo-bulnes commented Apr 23, 2016

See also Unexpected HTTP 401 Errors!

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

No branches or pull requests

2 participants