Ali Samadi
Ali Samadi2w ago

authenticatedProcedure

Is it true that for every requests, it is going to call getSession()? If yes, what is a good workaround or this is how everyone is doing?
No description
2 Replies
Nick
Nick2w ago
Yes middlewares run on every request, and it's necessary to validate sessions on every request, but the strength of using JWTs would be you can validate them without needing to make a DB or API call. If this is better-auth then presumably you're just making a DB query though and that's likely to be fine
Ali Samadi
Ali SamadiOP2w ago
Thanks for the help Nick!

Did you find this page helpful?