Anonymous
7/5/2025, 4:02:32 AM
No.105804553
>>105804405
How are you doing things? Typically I just sign a JWT and send it to the user as an HTTPS cookie and every request check that the cookie is valid and not expired. Every API call that requires a login can use the same middleware call to check the token's validity.
It's not that hard. I learned how from Traversy Media's nodejs API master course years ago with express/mongo years ago and have pretty much known how to do it ever since. Given I'm using hyper-express and prisma/postgres now instead, the code is very similar.
How are you doing things? Typically I just sign a JWT and send it to the user as an HTTPS cookie and every request check that the cookie is valid and not expired. Every API call that requires a login can use the same middleware call to check the token's validity.
It's not that hard. I learned how from Traversy Media's nodejs API master course years ago with express/mongo years ago and have pretty much known how to do it ever since. Given I'm using hyper-express and prisma/postgres now instead, the code is very similar.