You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- access_token: The access token extracted from the authorization header or cookies
340
327
- anti_csrf_token: The anti-csrf token extracted from the authorization header or cookies. Can be undefined if antiCsrfCheck is false
341
-
- anti_csrf_check: If true, anti-csrf checking will be done. If false, it will be skipped. Defaults behaviour to check.
342
-
- check_database: If true, the session will be checked in the database. If false, it will be skipped. Defaults behaviour to skip.
328
+
- anti_csrf_check: If true, anti-csrf checking will be done. If false, it will be skipped. Default behaviour is to check.
329
+
- session_required: If true, throws an error if the session does not exist. Default is True.
330
+
- check_database: If true, the session will be checked in the database. If false, it will be skipped. Default behaviour is to skip.
343
331
- override_global_claim_validators: Alter the
344
332
- user_context: user context
345
333
346
-
Returned values:
347
-
- GetSessionOkResult: The session was successfully validated, including claim validation
348
-
- GetSessionClaimValidationErrorResult: While the access token is valid, one or more claim validators have failed. Our frontend SDKs expect a 403 response the contents matching the value returned from this function.
349
-
- GetSessionTryRefreshTokenErrorResult: This means, that the access token structure was valid, but it didn't pass validation for some reason and the user should call the refresh API.
350
-
- You can send a 401 response to trigger this behaviour if you are using our frontend SDKs
351
-
- GetSessionUnauthorizedErrorResult: This means that the access token likely doesn't belong to a SuperTokens session. If this is unexpected, it's best handled by sending a 401 response.
334
+
Results:
335
+
- OK: The session was successfully validated, including claim validation
336
+
- CLAIM_VALIDATION_ERROR: While the access token is valid, one or more claim validators have failed. Our frontend SDKs expect a 403 response the contents matching the value returned from this function.
337
+
- TRY_REFRESH_TOKEN_ERROR: This means, that the access token structure was valid, but it didn't pass validation for some reason and the user should call the refresh API.
338
+
You can send a 401 response to trigger this behaviour if you are using our frontend SDKs
339
+
- UNAUTHORISED: This means that the access token likely doesn't belong to a SuperTokens session. If this is unexpected, it's best handled by sending a 401 response.
0 commit comments