Configuration
NeuctraAuthixConfig
| Field | Type | Required | Description |
|---|
| appName | string | Yes | Unique application name used to identify your project within Neuctra Authix. |
| baseUrl | string | Yes | Neuctra Authix API base URL (e.g. https://server.authix.neuctra.com/api) |
| publishableKey | string | No | Browser-safe key (pk_live_…). Scoped to end-user auth and the signed-in user's own data. Provide this OR secretKey. |
| secretKey | string | No | Server-only key (sk_live_…) with full account authority. Never include it in client code. Provide this OR publishableKey. |
| appId | string | Yes | App ID for scoping operations; automatically included in SDK requests where required. |
Auth & User
SignupParams
| Field | Type | Required | Description |
|---|
| name | string | Yes | Display name |
| email | string | Yes | User email |
| password | string | Yes | Account password |
| username | string | No | Unique username |
| phone | string | null | No | Phone number |
| address | string | null | No | Mailing address |
| avatarUrl | string | null | No | Profile image URL |
| isActive | boolean | No | Account active status |
| role | string | No | User role |
LoginParams
| Field | Type | Required | Description |
|---|
| email | string | Yes | User email |
| password | string | Yes | Account password |
UpdateUserParams
| Field | Type | Required | Description |
|---|
| userId | string | Yes | User ID to update. Sent as /users/update/:userId |
| appId | string | Yes | Required by the API to verify app ownership |
| name | string | No | Display name |
| username | string | null | No | Unique username |
| email | string | No | Email address |
| password | string | No | New password |
| phone | string | null | No | Phone number |
| address | string | null | No | Address |
| avatarUrl | string | null | No | Avatar URL |
| isActive | boolean | No | Active status |
| role | string | No | User role |
| settings | unknown | No | Arbitrary app-defined settings |
| packageInfo | unknown | No | Arbitrary app-defined package info |
| notifications | unknown | No | Arbitrary app-defined notifications |
| extraInfo | unknown | No | Arbitrary app-defined extra info |
ChangePasswordParams
| Field | Type | Required | Description |
|---|
| userId | string | Yes | User ID |
| currentPassword | string | Yes | Current password |
| newPassword | string | Yes | New password |
DeleteUserParams
| Field | Type | Required | Description |
|---|
| userId | string | Yes | User ID to delete |
CheckSessionResponse
| Field | Type | Required | Description |
|---|
| authenticated | boolean | Yes | Whether the user has an active session |
| user | Record<string, any> | No | Session user object when authenticated |
CheckUserResponse
| Field | Type | Required | Description |
|---|
| success | boolean | Yes | Request succeeded |
| exists | boolean | Yes | Whether user exists in app |
User Extra Data
GetUserAllDataParams
| Field | Type | Required | Description |
|---|
| userId | string | Yes | Target user ID |
| limit | number | No | Page size (default 20) |
| cursor | string | null | No | Pagination cursor from previous response |
| category | string | No | Filter by data category |
GetUserDataResponse<T>
| Field | Type | Required | Description |
|---|
| success | boolean | Yes | Request succeeded |
| message | string | No | Optional message |
| totalFetched | number | Yes | Items returned in this page |
| hasMore | boolean | Yes | More pages available |
| nextCursor | string | null | Yes | Cursor for next page |
| data | T[] | Yes | Data items |
GetSingleUserDataParams
| Field | Type | Required | Description |
|---|
| userId | string | Yes | User ID |
| dataId | string | Yes | Data item ID |
AddUserDataParams
| Field | Type | Required | Description |
|---|
| userId | string | Yes | User ID |
| dataCategory | string | Yes | Category for the data item |
| data | Record<string, any> | Yes | Fields to store |
UpdateUserDataParams
| Field | Type | Required | Description |
|---|
| userId | string | Yes | User ID |
| dataId | string | Yes | Data item ID |
| data | Record<string, any> | Yes | Fields to update |
DeleteUserDataParams
| Field | Type | Required | Description |
|---|
| userId | string | Yes | User ID |
| dataId | string | Yes | Data item ID |
App Data & Users
AppDataItem
| Field | Type | Required | Description |
|---|
| id | string | Yes | Item ID |
| [key: string] | any | No | Additional dynamic fields |
GetAppUsersDataOptions
| Field | Type | Required | Description |
|---|
| category | string | No | Filter by category |
| limit | number | No | Page size (default 20) |
| cursor | string | null | No | Pagination cursor |
GetAppUsersDataResponse<T>
| Field | Type | Required | Description |
|---|
| success | boolean | Yes | Request succeeded |
| totalFetched | number | Yes | Items in this page |
| hasMore | boolean | Yes | More pages available |
| nextCursor | string | null | Yes | Cursor for next page |
| data | T[] | Yes | User data items |
GetAllAppUsersOptions
| Field | Type | Required | Description |
|---|
| limit | number | No | Page size (default 20) |
| cursor | string | null | No | Pagination cursor |
| search | string | No | Search query |
| role | string | No | Filter by role |
| isActive | boolean | No | Filter by active status |
| isVerified | boolean | No | Filter by verified status |
GetAllAppUsersResponse<T>
| Field | Type | Required | Description |
|---|
| success | boolean | Yes | Request succeeded |
| totalFetched | number | Yes | Users in this page |
| hasMore | boolean | Yes | More pages available |
| nextCursor | string | null | Yes | Cursor for next page |
| data | T[] | Yes | User records |
Note on getUserProfile
The SDK method getUserProfile accepts { userId: string } instead of a JWT token. Use checkUserSession() for session validation.