lynndylanhurley / lynndylanhurley/devise_token_auth

Auth headers missing on successful sign in response for multiple models

Open
#1,165 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
3.6k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I have setup devise_token_auth for multiple models( User and Admin). I am getting auth header for User sign in but not for admin sign in.

```
devise (4.4.3)
devise_token_auth (0.1.43)
active_model_serializers `(0.10.7)
```

```
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :recoverable, :trackable, :validatable, authentication_keys: [:mobile_number]
include DeviseTokenAuth::Concerns::User
end
```

```
class Admin < ActiveRecord::Base
devise :database_authenticatable, :registerable, :recoverable, :trackable, :validatable

include DeviseTokenAuth::Concerns::User
end
```

I also checked the @resource.valid? for Admin login and it is coming true. Any help guys?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the sign-in handling for multiple Devise models and compare the User and Admin configurations shown in the issue. Reproduce an Admin sign-in with devise_token_auth 0.1.43 and trace whether the successful response includes auth headers; done means Admin sign-in returns the expected headers like User sign-in.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.