Is there a way to verify the session cookie without calling the API?

I want to be able to verify if the session cookie is valid, and decode it, without having to call the API
3 Replies
The Untraceable
Sounds like you're looking for JWTs
Cory
CoryOP4d ago
I basiclly just want to do what ‘getAuth’ does, for the cookie cache, rather than calling the endpoint
The Untraceable
If youre calling auth.api.getSession server side, you don't call an endpoint but the underlying function but that still incurs the cost of calling the db. With JWTs the data is self contained and signed making them tamper-proof so I think that'd be good for what you need; check if the token signature is valid and the token isn't expired

Did you find this page helpful?