lynndylanhurley / lynndylanhurley/devise_token_auth

Bug: Registration broken if multiple users signed in.

Open
#1,278 2 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

This [change](https://github.com/lynndylanhurley/devise_token_auth/pull/1075/files#diff-160c1afc120d57b344db17e0b7fc4280L16) made it so that there is no sign in when a user confirms their email address. Instead, `signed_in_resource` is called, which in turn calls warden authenticate.

This means that the redirect url does not send the proper params for authenticating with the redirect URL.

This can be fixed simply by adding back in the call to `sign_in(@resource)` and saving the resource after calling `create_token` on it a few lines down.

Contributor guide

Open the contributing guide

Research direction

Open the linked change and trace the email-confirmation path through signed_in_resource and warden authenticate. Verify that restoring sign_in(@resource) and saving after create_token preserves the redirect URL's authentication parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, authentication
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.