I'm trying to allow using on mobile devices to be authenticated using a token, while still using the webforms for the web application. I decided to use devise_token_auth. Whenever I try and start the application I get an error because a session path is already defined.
error
ArgumentError: Invalid route name, already in use: 'new_provider_session'
config/routes.rb
mount_devise_token_auth_for 'Provider', at: 'api/v1/auth'
devise_for :providers, controllers: {} do
get 'providers/sign_in', to: 'web/sessions#new'
delete 'providers/sign_out', to: 'web/sessions#destroy'
end
root to: 'web/welcome#welcome'
devise_for :admins, controllers: {} do
get 'admins/sign_in', to: 'web/sessions#new'
delete 'admins/sign_out', to: 'web/sessions#destroy'
end