Next.js Discord

Discord Forum

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
Open in Discord
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
:fine: