lynndylanhurley / lynndylanhurley/devise_token_auth

DeviseTokenAuth::Concerns::SetUserByToken wrong number of arguments 1 for 0

Open
#450 10 comments 1 reaction 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

Something strange happens inside DeviseTokenAuth::Concerns::SetUserByToken#set_user_by_token()

```
activesupport (4.2.5) lib/active_support/core_ext/class/attribute.rb:106:in `block (2 levels) in class_attribute'
devise_token_auth/app/controllers/devise_token_auth/concerns/set_user_by_token.rb:24:in `set_user_by_token'
devise_token_auth/lib/devise_token_auth/controllers/helpers.rb:115:in `current_user'
devise_token_auth/lib/devise_token_auth/controllers/helpers.rb:103:in `authenticate_user!'
```

It seems that `rc = resource_class(mapping)` doesn't work well. ( `resource_class` doesn't work well with parameter )

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 at devise_token_auth/app/controllers/devise_token_auth/concerns/set_user_by_token.rb:24 and trace the resource_class(mapping) call through devise_token_auth/lib/devise_token_auth/controllers/helpers.rb:103 and :115. Reproduce the failure with ActiveSupport 4.2.5 and determine why the call receives an argument; done means the reported wrong-number-of-arguments error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, authentication
Issue type
Bug
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.