Can I access the iss
claim?
#26
-
The user model nicely includes data from the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The from jose.jwt import encode as jwt_decode
@router.get("/")
async def root(request: Request):
print(jwt_decode(request.auth.provider.access_token, "", "<alg>")) |
Beta Was this translation helpful? Give feedback.
The
request.user
contains the user information obtained from the particular API endpoint based on the used IDP and most likely should not contain any JWT claims such asiss
. After the successful login, you have theaccess_token
in your request context and accessible byrequest.auth.provider.access_token
. Try to decode it with the algorithm it is signed with. For determining the algorithm, you can paste your token in https://jwt.io/ and also ensure that it contains theiss
claim or not.