lynndylanhurley / lynndylanhurley/devise_token_auth
Support for after_database_authentication callback
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 3.6k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Devise supports an after_database_authentication callback immediately after authenticating via the DatabaseAuthenticatable strategy (when calling authenticate!).
However DTA uses the controller method sign_in directly, which does not call this callback after successfully authenticating - similar to this issue's cause.
Would you be okay with me opening a PR to call this callback after sign_in in DeviseTokenAuth::Concerns::SetUserByToken? @lynndylanhurley Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in DeviseTokenAuth::Concerns::SetUserByToken and compare its direct sign_in flow with Devise's DatabaseAuthenticatable strategy and authenticate! callback behavior. Confirm that a successful sign_in invokes after_database_authentication, then verify the behavior with the relevant authentication tests; the issue does not name a specific test file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, authentication
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100