#where to send JWT ?

10 messages · Page 1 of 1 (latest)

stable smelt
#

Hi guys I am wondering where should I send the Tokens to ?
Body
{"IamToken":"value"}

Query Params
/test?IamToken=value

Params
/test/IamToken

and the token I mean for those stuff
Reset Password
Activate User by email
etc..

zinc mist
#

Usually in the Authorization header in the format bearer <the token>

#

That's pretty much the standard. You can google for "bearer token" if you want more information

stable smelt
zinc mist
#

Oh, then that's not really standardized in any way. We used body in a previous project, because you can say it's the actual payload of the request and not just some additinal metadata

#

But if you want to use a link from email for example, then your only option is the query or params. Query is better in this situation, because it's encrypted on the transport layer with TLS, while the url is not

stable smelt
#

and then request

#

to backend

zinc mist
#

The url before the query string still travels over the network unencrypted so the routers know where to route it.