You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.
but since there is no User model in the lib it will force whoever who uses knock to have a model named User and expect a claim named user_id to be present in the JWT.
What I'd like to have is a way to define how the user is retrieved from my DB, e.g. in my app's config/knock.rb I could have:
The gem in its original version is very opinionated as it's pulled from personal use cases. But I totally agree that it should evolve towards a more generic solution.
Thank you for your suggestions, I implemented them. This should resolve the issue.
In authenticable.rb the
@current_user
is retrieved like thisbut since there is no User model in the lib it will force whoever who uses knock to have a model named
User
and expect a claim nameduser_id
to be present in the JWT.What I'd like to have is a way to define how the user is retrieved from my DB, e.g. in my app's
config/knock.rb
I could have:and then in
authenticable.rb
This will allow to fetch the user from any model using any claim in the JWT
The text was updated successfully, but these errors were encountered: