Closed tejasbubane closed 7 years ago
Warden defaults to default
scope, and otherwise you have to tell it.
So, you have to use:
env['warden'].authenticate!(scope: :user)
env['warden'].set_user(User.instance, store: false, scope: :user)
instead that current:
env['warden'].authenticate!
env['warden'].set_user(User.instance, store: false)
That's warden API.
Thanks! 👍
I overlooked warden scope
from the README and assumed that to be this gem's API for config.
The README has this model mapping:
and revocation strategy:
This does not seem to work for me. It does not send the JWT token in the header for login - no error shown.
Wiki uses
default
instead ofuser
as key. I have taken the example in wiki and replaced the keydefault
withuser
and it stops working. Does not work with any other key exceptdefault
. Isdefault
the expected key?You can find the code in this gist.