Is it a good idea to generate JWT on route handler or should I have a separate server
Unanswered
Schneider’s Smooth-fronted Caima… posted this in #help-forum
Schneider’s Smooth-fronted CaimanOP
Hello champs. Quick question, would it be a good idea to generate the jwt token on route handlers? Or should I create a separate server to connect to the db, find user and generate the token and store it as httpCookie! 😆
3 Replies
Chub mackerel
just generate the JWT in your route handler bro, no need for a whole extra server

@Schneider’s Smooth-fronted Caiman Hello champs. Quick question, would it be a good idea to generate the jwt token on route handlers? Or should I create a separate server to connect to the db, find user and generate the token and store it as httpCookie! 😆
Prothonotary Warbler
why would you create another server for JWTs
only if you have a reason to separate auth from your route handlers
only if you have a reason to separate auth from your route handlers