JWT in the response body

34 views
Skip to first unread message

Daniel Calixto

unread,
Jun 25, 2021, 6:53:32 PM6/25/21
to Rodauth
Hello, sorry for the incovenience but,
after setup the jwt config
create the account and login the auth_token goes to  headers, where should get by response body

r-header.png
So, i would like to know how to get jwt in the response body.

axios.png

Jeremy Evans

unread,
Jun 25, 2021, 7:51:35 PM6/25/21
to rod...@googlegroups.com
On Fri, Jun 25, 2021 at 3:53 PM Daniel Calixto <calixt...@gmail.com> wrote:
Hello, sorry for the incovenience but,
after setup the jwt config
create the account and login the auth_token goes to  headers, where should get by response body

If you want the JWT token in the response body instead of in the response Authorization header, something like this in your Rodauth configuration may work:

  set_jwt_token do |token|
    json_response['jwt'] = token
  end

Thanks,
Jeremy
Reply all
Reply to author
Forward
0 new messages