-
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
API versioning the devise scope of token validation and ominiauth controller path will wrap up #96
Comments
@vs-zhang - try un-nesting the Something like this: namespace :api, defaults: {format: :json} do
scope module: :v1, constraints: ApiConstraints.new(version: 1, default: :true) do
# add the rest of your versioned routes here
end
end
# mount the auth routes outside of the namespace
mount_devise_token_auth_for 'User', at: '/api/v1/auth' I haven't been able to get devise to cooperate with namespaces or scopes from within my gem. Spelling out the full path in the at param seems to be the only way to make it work. But this situation may have changed since I last tried. I'll look into solving this issue for the next release. |
Yes, I un-nesting and only use one scope for now
And it works but not for versioning, just want to point it out. |
@vs-zhang - I just pushed an update that may fix your nesting issue. Please update to version |
This is the route configuration that I'm using in the tests, and it's passing:
|
@lynndylanhurley I am using a fork version of mongoid, i will make the change and test it later. When i get more time late, hope i can contribute more for the mongoid version. |
@vs-zhang - |
Closing due to inactivity. Can re-open as needed! |
Hi @lynndylanhurley
First of all, thank's for making this gem. It make my life more easier.
But when i tried to use API versioning and i put
mount_devise_token_auth_for 'User', at: '/auth'
inside the namespace :api and scope :v1, the route of token validation and ominiauth will add api/v1, to the beginning.routes.rb:
and the route will be
I think it should be without the api/v1 in the controller path
The text was updated successfully, but these errors were encountered: