mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
docs: add optional field indicators
This commit is contained in:
@@ -178,6 +178,12 @@ Table Name: `user`
|
||||
type: "string",
|
||||
description: "User's email address for communication and login"
|
||||
},
|
||||
{
|
||||
name: "image",
|
||||
type: "string",
|
||||
description: "User's image url",
|
||||
isOptional: true
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
type: "Date",
|
||||
@@ -217,12 +223,14 @@ Table Name: `session`
|
||||
{
|
||||
name: "ipAddress",
|
||||
type: "string",
|
||||
description: "The IP address of the device"
|
||||
description: "The IP address of the device",
|
||||
isOptional: true
|
||||
},
|
||||
{
|
||||
name: "userAgent",
|
||||
type: "string",
|
||||
description: "The user agent information of the device"
|
||||
description: "The user agent information of the device",
|
||||
isOptional: true
|
||||
},
|
||||
]}
|
||||
/>
|
||||
@@ -259,21 +267,25 @@ Table Name: `account`
|
||||
name: "accessToken",
|
||||
type: "string",
|
||||
description: "The access token of the account. Returned by the provider",
|
||||
isOptional: true,
|
||||
},
|
||||
{
|
||||
name: "refreshToken",
|
||||
type: "string",
|
||||
description: "The refresh token of the account. Returned by the provider",
|
||||
isOptional: true,
|
||||
},
|
||||
{
|
||||
name: "expiresAt",
|
||||
type: "Date",
|
||||
description: "The time when the access token expires",
|
||||
isOptional: true,
|
||||
},
|
||||
{
|
||||
name: "password",
|
||||
type: "string",
|
||||
description: "The password of the account. Mainly used for email and password authentication",
|
||||
isOptional: true,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -282,9 +282,9 @@ The plugin requires 3 additional fields in the `user` table.
|
||||
|
||||
<DatabaseTable
|
||||
fields={[
|
||||
{ name: "twoFactorEnabled", type: "boolean", description: "Whether two factor authentication is enabled for the user." },
|
||||
{ name: "twoFactorSecret", type: "string", description: "The secret key used to generate TOTP codes." },
|
||||
{ name: "twoFactorBackupCodes", type: "string", description: "Encrypted backup codes for account recovery." },
|
||||
{ name: "twoFactorEnabled", type: "boolean", description: "Whether two factor authentication is enabled for the user.", isOptional: true },
|
||||
{ name: "twoFactorSecret", type: "string", description: "The secret key used to generate TOTP codes.", isOptional: true },
|
||||
{ name: "twoFactorBackupCodes", type: "string", description: "Encrypted backup codes for account recovery.", isOptional: true },
|
||||
]}
|
||||
/>
|
||||
|
||||
|
||||
@@ -106,6 +106,6 @@ The anonymous plugin requires an additional field in the user table:
|
||||
|
||||
<DatabaseTable
|
||||
fields={[
|
||||
{ name: "isAnonymous", type: "boolean", description: "Indicates whether the user is anonymous." },
|
||||
{ name: "isAnonymous", type: "boolean", description: "Indicates whether the user is anonymous.", isOptional: true },
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -525,12 +525,14 @@ Table Name: `organization`
|
||||
{
|
||||
name: "logo",
|
||||
type: "string",
|
||||
description: "The logo of the organization"
|
||||
description: "The logo of the organization",
|
||||
isOptional: true
|
||||
},
|
||||
{
|
||||
name: "metadata",
|
||||
type: "string",
|
||||
description: "Additional metadata for the organization"
|
||||
description: "Additional metadata for the organization",
|
||||
isOptional: true
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
|
||||
Reference in New Issue
Block a user