Decodes a Vincent JWT in string form and returns an VincentJWT decoded object for your use
Param: jwt
The jwt in string form. It will be decoded and checked to be sure it is not malformed.
Param: requiredAppId
The appId that should be in the payload of the JWT. If app is not defined, or app.id is different, this method will throw.
Info Note
This method only decodes the JWT_ -- you still need to verify the JWT to be sure it is valid!
If the JWT is expired, you need to use a WebAuthClient to get a new JWT.
if(!isJWTExpired) { // User is logged in // You still need to verify the JWT! } else { // User needs to get a new JWT webAuthClient.redirectToConnectPage({redirectUri:window.location.href }); }
Decodes a Vincent JWT in string form and returns an VincentJWT decoded object for your use
Param: jwt
The jwt in string form. It will be decoded and checked to be sure it is not malformed.
Param: requiredAppId
The appId that should be in the payload of the JWT. If app is not defined, or app.id is different, this method will throw.
Info Note
This method only decodes the JWT_ -- you still need to verify the JWT to be sure it is valid! If the JWT is expired, you need to use a WebAuthClient to get a new JWT.See getWebAuthClient
Function
Example