-
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
Routes not properly set #101
Comments
Thanks for the fix @lynndylanhurley The routes are drawn as they should now when the mount_devise_token_auth_for is inside the scope (I upgraded to the latest version at this time
However there are still issues when the mount_devise_token_auth_for is inside the scope like above. When trying to validate token at this path I get the error about
However if I place my routes code below the namespace like this:
The validate token hits the right controller but the both requests have the same path:
|
Thanks @c0mrade, I'm looking into this now. |
thanks @lynndylanhurley, let me know if I can help with anything else, I'll probably use this gem along with ng-token-auth in my app, not started yet though. Just trying stuff out at the moment |
Ok this one was more difficult than I'd realized. I think version |
Hello @lynndylanhurley Now I'm having another trouble logging in, here is the that bit from logs:
Then continued with the error:
Not sure if this helps but this is what happens when I key in the wrong password :
|
Thanks @c0mrade - I'll get this resolved ASAP. |
@c0mrade - I just pushed version |
I have the same problem with
|
@jirikolarik - that looks like a different issue. Please open a new issue, and include the post body from the failed request. |
Hello @lynndylanhurley When my routes are defined like this :
And I refresh a page, triggering the validate token, this is the error I get:
However when I change my route to : When my routes are defined like this :
This works without issues. So there are some more issues I guess. Thanks |
Can you try changing this line: mount_devise_token_auth_for 'User', at: '/auth' to this: mount_devise_token_auth_for 'User', at: 'auth' (Remove the "/" from "/auth") |
already tried it, sorry should have mentioned it. Result is the same. Using the latest version devise_token_auth (0.1.31.beta9) |
That's strange, the test-case is working fine using nearly identical code: Also, several others have reported that it's working in the latest beta. Did you restart your server and everything? I'll keep testing to see if I can reproduce. |
@lynndylanhurley |
I came across the same issue in 0.1.32.beta1. After testing I found that commenting out the following in token_validations_controller_test.rb
Caused the namespaced test to fail. In my current project, I mounted the unscoped/namespaced engine which resolved the error.
I hope this helps. I will spend some more time debugging. Thanks! |
What about making "devise_token_auth" act more like a library than a drop-in solution? |
Hi there @c0mrade , In an effort to cleanup this project and prioritize a bit, we're marking issues that haven't had any activity in a while with a "close-in-7-days" label. If we don't hear from you in about a week, we'll be closing this issue. Obviously feel free to re-open it at any time if it's the right time or this was done in error! If you are still having the issue (especially if it's a bug report) please refer to our new Issue Template to provide some more details to help us solve it. Hope all is well. |
this one is good to close too |
I just realized that this might be a duplicate of #96
I'm not sure is this a rails thing or a devise token auth thing but here is the part of routes in my project :
Here is some of the output of rake routes:
Which is generated to work with my routes. However token validation routes are not generating correctly:
So every time I check my token using this url
/api/v1/auth/validate_token
I get this error:This is because the routes are generated incorrectly again output of rake routes :
I'm using the latest version
devise_token_auth (0.1.31.beta1)
, is there any work around for this?The text was updated successfully, but these errors were encountered: