-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoMethodError (undefined method `client' for "<token>":String) #1375
Comments
@dinhngochien can you share how you resolved this please? 🙏 |
Does anyone know the solution? |
@faldunate this is now working for me, but I don't remember what I did. Most likely has to do with the structure in the request... 🤔 |
I had the same problem. In my case the fix was just to update the part of the overwritten method: - # create client id
- @client_id = SecureRandom.urlsafe_base64(nil, false)
- @token = SecureRandom.urlsafe_base64(nil, false)
-
- @resource.tokens[@client_id] = {
- token: BCrypt::Password.create(@token),
- expiry: (Time.zone.now + ::DeviseTokenAuth.token_lifespan).to_i
- }
+ @token = @resource.create_token Just in case if it helps anybody. |
I got this error when updating the ruby version from
2.4.1
to2.6.5
(rails5.1.7
)The text was updated successfully, but these errors were encountered: