lynndylanhurley / lynndylanhurley/devise_token_auth
Omniauth redirect should send access-token not `auth_token`
- 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
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