is there a way to verify user's session token in t...
# talk-kratos
e
is there a way to verify user's session token in the nodejs backend? i am using a react native fronted and i am sending the session token as bearer token to my backend. I see there is a /sessions/whoami endpoint to verify the token, but doing so in each api call will slow the api. Am i supposed to cache the response or any other way to do it?
p
I am converting to JWT at my endpoint to reduce api load https://www.ory.sh/docs/kratos/session-management/overview#json-web-token-jwt-support
if you don't want to make repeated calls to
toSession
/
/sessions/whoami
, or you need to use JWTs in your setup, you can convert Ory Sessions to JWTs on your entry point. There, you could add caching to further reduce the amount of API calls made
e
awesome! let me try this.. thanks for helping 😄