-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
https://github.com/hwjeremy/siwa-python/blob/main/siwa/library/token/payload.py#L62
The email is not always there, and when it's not, you get a fatal KeyError. In fact, there are more properties that are optional, for example this is the JWT I get for one of my users:
{
"iss": "https://appleid.apple.com",
"aud": "[value]",
"exp": 1634418396,
"iat": 1634331996,
"sub": "[value]",
"c_hash": "[value]",
"auth_time": 1634331996,
"nonce_supported": true
}
So both email and email_verified are missing there and will cause KeyError. Probably a lot safer to user .get(key, default_value) for all these data properties.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels