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?

2 Replies
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
Thanks for the help Nick!