You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Gonzalo. How do you go around namespacing for an API with this gem? I can't figure out whether it's STA or Devise who's causing the trouble, but when trying to do the following my app and auth specs break.
constrants subdomain: 'api' do
namespace :api, path '/' do
namespace :v1 do
devise_for :users, :skip => [:sessions, :registrations, :passwords], path_prefix: 'api/v1'
devise_scope :user do
post 'login' => 'sessions#create', :as => :login
delete 'logout' => 'sessions#destroy', :as => :logout
post 'register' => 'registrations#create', :as => :register
delete 'delete_account' => 'registrations#destroy', :as => :delete_account
end
end
end
end
That's with the subdomain configured in the hosts file and the following test:
It 'creates a new user with correct credentials' do
post 'http://api.scrapit-dev.com:3000/v1/register', format: :json, :user => {email: 'user@test.com', password: 'TestPass123', password_confirmation: 'TestPass123', username: 'testuser'}
end
This is the error I get
The text was updated successfully, but these errors were encountered:
Hi @foffer, I forgot answering your question, I'm sorry for that. The namespaces issues related to Simple Token Authentication were described in #83, and should be solved by the possibility to define aliases for namespaced models that the v1.9.0 release does ship.
Another namespace-related, but not directly Simple Token Authentication-related issue was mentionned in this comment but I sadly don't know what happened with it.
Hi Gonzalo. How do you go around namespacing for an API with this gem? I can't figure out whether it's STA or Devise who's causing the trouble, but when trying to do the following my app and auth specs break.
That's with the subdomain configured in the hosts file and the following test:
This is the error I get
![screen shot 2015-01-13 at 12 47 51](https://cloud.githubusercontent.com/assets/1674650/5720892/711677d0-9b22-11e4-8062-77c11343ec2c.png)
The text was updated successfully, but these errors were encountered: