Reading the JWT Payload (Securely)
getJWTPayloadSecurely function: API Reference
import SuperTokensRequest from 'supertokens-website';
let payload = await SuperTokensRequest.getJWTPayloadSecurely();
let payload = await supertokens.getJWTPayloadSecurely();
- Returns a
Promise<JSON object>or throws an error in case reading failed.
- This does not read from the access token, since that is in
httpOnlycookie. Instead, it reads from another token that contains a copy of the payload in the access token.