gray-morning-82571
02/27/2024, 3:34 PMrefined-kangaroo-48640
02/27/2024, 3:45 PMgray-morning-82571
02/27/2024, 3:47 PMwhoami
on every request because of latency I need to look into session tokens instead?refined-kangaroo-48640
02/27/2024, 4:37 PM/sessions/whoami
, ideally on every request.
What I meant was a more fundamental difference. In session-based authn (what Ory Identities/Ory Kratos does), you are normally expected to check for session validity on every request. Upside: revocation and updates to the session are instantaneous. Downside: you need to perform the check every time.
If instead Kratos issued a longer-lived token (for example a JWT) which you validate by checking the signature, expiry, etc without contacting Ory Network, that'd be "token-based" authn. Upside: don't have to call /sessions/whoami from your backend in every request. Downside: revocation and updates are not real-time.refined-kangaroo-48640
02/27/2024, 4:59 PM/sessions/whoami
.refined-kangaroo-48640
02/27/2024, 5:00 PMHttpOnly
cookie in the response, and authenticate it yourself on subsequent requests instead of calling /sessions/whoami
again.refined-kangaroo-48640
02/27/2024, 5:01 PMrefined-kangaroo-48640
02/27/2024, 5:33 PMgray-morning-82571
02/28/2024, 6:45 AMrefined-kangaroo-48640
02/28/2024, 8:07 AMrefined-kangaroo-48640
02/28/2024, 8:08 AMrefined-kangaroo-48640
02/28/2024, 8:19 AMrefined-kangaroo-48640
02/28/2024, 8:21 AMgray-morning-82571
02/28/2024, 8:24 AM