Hy,
I'm using your knock gem in a rails 5 api. My question is, if or how I can modify the method user_token to e.g. also return some data of the current or authenticated user? (in addition to the jwt)
I guess i could create my own auth_token_controller.rb but if there's a simpler / easier way, I would appreciate it.
Thx
alright .. I thought this gem is going to be maintained? 馃馃様
however, i solved my own problem by overriding the class method by creating a ruby file in the initializers including this code:
Knock::AuthTokenController.class_eval do
def create
render json: {
jwt: auth_token.token,
myparam: my_value
}, status: :created
end
end
This should be added in my opinion
Most helpful comment
alright .. I thought this gem is going to be maintained? 馃馃様
however, i solved my own problem by overriding the class method by creating a ruby file in the initializers including this code: