NhostSession
NhostSession
Section titled “NhostSession”Parameters
Section titled “Parameters”accessToken required string
accessTokenExpiresIn required number
refreshToken required null | string
refreshTokenId optional null | string
user required User
| Property | Type | Required | Notes |
|---|---|---|---|
| user.activeMfaType | null | “totp” | ✔️ | |
| user.phoneNumberVerified | boolean | ✔️ | |
| user.phoneNumber | null | string | ✔️ | |
| user.emailVerified | boolean | ✔️ | Is true if the user email has not been verified |
| user.metadata | Record<string, unknown> | ✔️ | Additional attributes used for user information |
| user.roles | Array<string> | ✔️ | The roles assigned to the user |
| user.defaultRole | string | ✔️ | The default role of the user |
| user.isAnonymous | boolean | ✔️ | Whether or not the user is anonymous |
| user.locale | string | ✔️ | The locale of the user, as a two-characters string |
| user.avatarUrl | string | ✔️ | The URL to the user’s profile picture |
| user.displayName | string | ✔️ | User’s display name |
| user.createdAt | string | ✔️ | The date-time when the user has been created |
| user.id | string | ✔️ | User’s unique identifier (uuid) |
| user.email | string | User’s email address |