lynndylanhurley / lynndylanhurley/devise_token_auth

Support for after_database_authentication callback

Open
#1,580 2 comments 3 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.