Is there a way to not call every single time the /whoami
Kratos API? Is there a way to use the cookie session only?
#1509
-
I'm curious if there is a way to avoid calling the Let's say that I am authenticated (I have the cookie, secure, strict, HTTP only etc) and that I am doing routine operations, NOT SERIOUS and NON IRREVOCABLE operations. There is a way to have the session in the cookie itself: userID, any tenantID and any scopes; without asking this to Kratos every time? If the cookie is encrypted I can use a method when starting the app to get the key from Kratos to decrypt the cookie ( And if I have to do IRREVERSIBLE operations then I can only contact Kratos in that case before proceeding. Alternatively, I could timeout the calls to Kratos, like every 10, 30, 60 minutes. What do you think? Am I exaggerating in evaluating Kratos' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can probably solve this in your application logic, check for sessions with But usually calling What was the original motivation to have less calls to |
Beta Was this translation helpful? Give feedback.
You can probably solve this in your application logic, check for sessions with
/whoami
when you see fit, and omit the check otherwise.But usually calling
/sessions/whoami
will be the straightforward way.What was the original motivation to have less calls to
/whoami
?