Recommended: JavaScript SDK with React Hooks
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) to get started.| Field | Description |
|---|---|
| userId?: string | [Optional] - Dynamic’s UUID |
| sessionId: string | [Optional] - The current session ID |
| environmentId?: string | [Optional] - Dynamic environment ID |
| newUser?: boolean | [Optional] - Is it first time user created/logged in |
| email?: string | [Optional] - User’s email |
| alias?: string | [Optional] - User’s alias |
| firstName?: string | [Optional] - User’s first name |
| lastName?: string | [Optional] - User’s last name |
| phoneNumber? string | [Optional] - User’s phone number |
| lists?: string[] | [Optional] - User’s access lists. See Access Control. |
| verifiedCredentials?: JWTVerifiedCredential[] | [Optional] - User’s verified credentials |
| lastVerifiedCredentialId: string |\ undefined | [Optional] - User’s last verified credential ID |
| scope?: string | [Optional] - User’s scope |