lynndylanhurley / lynndylanhurley/devise_token_auth

Omniauth redirect should send access-token not `auth_token`

Open
#1,656 0 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

My client checks on the URL query param access-token and not `auth_token`, when confirming email or resetting a password, it is `access-token`.

So the code in `OmniauthCallbacksController`, should be:

```ruby
def create_auth_params
@auth_params = @resource.build_auth_headers(@token.token, @token.client)
@auth_params[:oauth_registration] = true if @oauth_registration
@auth_params
end
```

instead of

```ruby
def create_auth_params
@auth_params = {
auth_token: @token.token,
client_id: @token.client,
uid: @resource.uid,
expiry: @token.expiry,
config: @config
}
@auth_params.merge!(oauth_registration: true) if @oauth_registration
@auth_params
end
```

Contributor guide

Open the contributing guide

Research direction

Start in OmniauthCallbacksController and inspect create_auth_params, comparing the current redirect parameters with the shown build_auth_headers path. Verify that the resulting URL uses access-token rather than auth_token when confirming email or resetting a password.

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
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.