okta / okta-jwt-verifier-python

okta-jwt-verifier-python
https://github.com/okta/okta-jwt-verifier-python
Apache License 2.0
33 stars 17 forks source link

got TypeError with "cannot unpack non-iterable NoneType object" when verify a valid Okta access token #40

Open gigi888 opened 2 years ago

gigi888 commented 2 years ago

Hello,

I am using python 3.8 with okta_jwt_verifier 0.2.3 as

from okta_jwt_verifier import BaseJWTVerifier
jwt_verifier = BaseJWTVerifier(issuer='my_issuer', audience='my_aud')

(headers, claims, signing_input, signature) = jwt_verifier.verify_expiration(token)

when the program is invoked with a valid Okta access token (working with other jwt verifier), I got TypeError: cannot unpack non-iterable NoneType object

Can I have some help please? Let me know please if more information are needed

gigi888 commented 2 years ago

this is the header,

{
  "kid": "gDCwFWwb5y5fo_G3pAeGY3tpz10DpA1nzbdmnYMzohs",
  "alg": "RS256"
}

payload,

{
  "ver": 1,
  "jti": "AT.cAMGDdJgTrzK6HooJ5e8YTnFJnCXcBTEOh2CDAUXguQ.oar1ngb4gpHePEqWK0h7",
  "iss": "my_iss",
  "aud": "my_aud",
  "iat": 1654105698,
  "exp": 1654192098,
  "cid": "d432eb40-2002-4583-b63b-d675f3ccd29a",
  "uid": "00uu84u0b7unb4tz30h7",
  "scp": [
    "myscope",
    "offline_access",
    "email",
    "address",
    "openid",
    "scope2",
    "scope3",
    "profile"
  ],
  "auth_time": 1654105696,
  "sub": "summer",
  "platform_user_id": "uuid"
}