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
This is not an issue but a suggestion for decoding a JWT (hopefully, it helps):
The readme example shows how to use AccessTokenVerifier to validate an access token. However, if you want to use the claims/sub information within the payload for further user verification, you must decode the JWT.
To decode, you don't need to add PyJWT - the library has a built-in parser leveraging python-jose. To use it, import the following:
fromokta_jwt_verifierimportAccessTokenVerifier, JWTUtils
....
try:
awaitjwt_verifier.verify(access_token)
headers, claims, signing_input, signature=JWTUtils.parse_token(access_token)
# claims will be a dictionary that contains information like the 'sub' key
The text was updated successfully, but these errors were encountered:
This is not an issue but a suggestion for decoding a JWT (hopefully, it helps):
The readme example shows how to use AccessTokenVerifier to validate an access token. However, if you want to use the claims/sub information within the payload for further user verification, you must decode the JWT.
To decode, you don't need to add PyJWT - the library has a built-in parser leveraging python-jose. To use it, import the following:
The text was updated successfully, but these errors were encountered: