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
I ran rails g devise_token_auth:install User auth and got:
Running via Spring preloader in process 3396
create config/initializers/devise_token_auth.rb
create db/migrate/20160902083849_devise_token_auth_create_users.rb
create app/models/user.rb
insert app/controllers/application_controller.rb
gsub config/routes.rb
I ran rails g devise_token_auth:install Employer employer_auth and got:
Running via Spring preloader in process 3490
identical config/initializers/devise_token_auth.rb
create db/migrate/20160902084155_devise_token_auth_create_employers.rb
create app/models/employer.rb
skipped Concern is already included in the application controller.
gsub config/routes.rb
gsub config/routes.rb
Thank you for writing such a great gem.
I'm having trouble trying two authenticate with 2 models. I followed https://github.com/lynndylanhurley/devise_token_auth#view-live-multi-user-demos
I ran rails g devise_token_auth:install User auth and got:
I ran rails g devise_token_auth:install Employer employer_auth and got:
routes:
authenticate_user!, user_signed_in? and current_user works
authenticate_employer!, employer_signed_in? and current_employer does not work.
authenticate_employer! returns {"errors":["Authorized users only."]}
employer_signed_in? returns false
current_employer returns nil
it seems like a problem with the access token in the header but i'm not too sure.
i'm using rails5.0
devise 4.2.0
devise_token_auth 0.1.38
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: