The Clerk user resource, reduced to the fields listed in coverage.json.
Fields that ClerkJS exposes but this package does not decode are simply ignored, so a Clerk release that adds a field cannot break decoding.
Decode a User from the JSON the shim sends.
{ "id": "user_1"
, "primaryEmailAddress": "[email protected]"
, "firstName": "Ada"
, "lastName": "Lovelace"
, "imageUrl": "https://img.clerk.com/ada"
, "createdAt": 1700000000000
}Every nullable field accepts null. createdAt arrives as epoch
milliseconds.
A signed-in Clerk user.
primaryEmailAddressis the email address string itself (user.primaryEmailAddress?.emailAddressin ClerkJS), not the resource object.