> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# JWT Payload

<Card title="Recommended: JavaScript SDK with React Hooks" icon="react" color="#4779FE">
  For new React apps, we recommend the JavaScript SDK with React Hooks (`@dynamic-labs-sdk/react-hooks`) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the [React quickstart (JavaScript SDK)](/javascript/reference/react-quickstart) to get started.
</Card>

When an end user connects their wallet, you, the developer, get a [JSON Web Token (JWT)](https://jwt.io/introduction) that can be used to verify some claims about the end user, notably a proof of ownership over a wallet public address.

After authenticating the JWT token (see [Verifying the JWT](/overview/authentication/tokens#verifying-the-jwt)), you may want to leverage user and wallet information provided in the JWT. Below we have the content defined with the aim of following the JWT standards.

##### Standard JWT claims:

See: [https://www.rfc-editor.org/rfc/rfc7519#section-4.1](https://www.rfc-editor.org/rfc/rfc7519#section-4.1)

| Field | Description                                                                                                                                                                                                            |
| ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| aud   | Audience for the JWT token. This claim shows what domain of the indended audience of the JWT.                                                                                                                          |
| iss   | Issuer of the JWT token. This claim shows app.dynamic.xyz generated and issued the JWT.                                                                                                                                |
| sub   | Subject of the JWT token. userId in the deprecated info claim.                                                                                                                                                         |
| scope | Space-separated list of scopes granted to this token (e.g. `user:basic`). Verify the list includes `user:basic` before trusting the token. See [Verifying the JWT](/overview/authentication/tokens#verifying-the-jwt). |
| iat   | Timestamp when the JWT token was issued.                                                                                                                                                                               |
| exp   | Timestamp when the JWT token will expire.                                                                                                                                                                              |

##### Dynamic-specific claims:

These fields are **optional** and you depends on whether you want to collect this information during onboarding. For more information about collecting this information, see [here](/react/users/information-capture).

| alias                 | Alias field from customer information capture.                                                                                                                                     |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| email                 | Email field from customer information capture.                                                                                                                                     |
| environment\_id       | Unique ID of the project environment for the SDK, from [https://app.dynamic.xyz/dashboard/api](https://app.dynamic.xyz/dashboard/api). environmentId in the deprecated info claim. |
| given\_name           | First name field from customer information capture. firstName in the deprecated info claim.                                                                                        |
| family\_name          | Last name field from customer information capture. lastName in the deprecated info claim.                                                                                          |
| lists                 | Names of access lists enabled for this user. See [Access Control](/overview/access-control/overview).                                                                              |
| verified\_credentials | List of all [verified credentials](/react/reference/objects/verified-credential) connected to this user.                                                                           |
| verified\_account     | If present, this was the most recently signed and verified account.                                                                                                                |

#### Example

```JSON{ theme={"system"}
  "alias": "john",
  "aud": "https://dashboard.hello.xyz",
  "verified_credentials": [
    {
      "address": "0x000123abc",
      "chain": "eip155",
      "id": "af615228-99e5-48ee-905d-4575f0a6bfc9",
      "wallet_name": "metamask"
    }
  ],
  "email": "[[email protected]](/cdn-cgi/l/email-protection)",
  "environment_id": "fb6dd9d1-09f5-43c3-8a8c-eab6e44c37f9",
  "family_name": "bot",
  "given_name": "jon",
  "iss": "app.dynamic.xyz/fb6dd9d1-09f5-43c3-8a8c-eab6e44c37f9",
  "lists": [ "Community dashboard access list" ],
  "scope": "user:basic",
  "sub": "d261ee91-8ea0-4949-b8bb-b6ab4f712a49",
  "verified_account": {
    "address": "0x000123abc",
    "chain": "eip155",
    "id": "af615228-99e5-48ee-905d-4575f0a6bfc9",
    "wallet_name": "metamask"
  },
  "iat": 1660677597,
  "exp": 1660684797
}
```
