Skip to content

Commit 64e275e

Browse files
authored
Merge pull request #46 from objectstack-ai/copilot/add-better-auth-plugin
2 parents 7fd8f1f + 6254324 commit 64e275e

40 files changed

+4881
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: AuthenticationConfig
3+
description: AuthenticationConfig Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Configuration name (snake_case) |
11+
| **label** | `string` || Display label |
12+
| **strategies** | `Enum<'email_password' \| 'magic_link' \| 'oauth' \| 'passkey' \| 'otp' \| 'anonymous'>[]` || Enabled authentication strategies |
13+
| **baseUrl** | `string` || Application base URL |
14+
| **secret** | `string` || Secret key for signing (min 32 chars) |
15+
| **emailPassword** | `object` | optional | |
16+
| **magicLink** | `object` | optional | |
17+
| **passkey** | `object` | optional | |
18+
| **oauth** | `object` | optional | |
19+
| **session** | `object` | optional | |
20+
| **rateLimit** | `object` | optional | |
21+
| **csrf** | `object` | optional | |
22+
| **accountLinking** | `object` | optional | |
23+
| **twoFactor** | `object` | optional | |
24+
| **userFieldMapping** | `object` | optional | |
25+
| **database** | `object` | optional | |
26+
| **plugins** | `object[]` | optional | |
27+
| **hooks** | `object` | optional | Authentication lifecycle hooks |
28+
| **security** | `object` | optional | Advanced security settings |
29+
| **email** | `object` | optional | Email configuration |
30+
| **ui** | `object` | optional | UI customization |
31+
| **active** | `boolean` | optional | Whether this provider is active |
32+
| **allowRegistration** | `boolean` | optional | Allow new user registration |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: AuthenticationProvider
3+
description: AuthenticationProvider Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **type** | `string` || Provider type identifier |
11+
| **config** | `object` || Authentication configuration |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: AccountLinkingConfig
3+
description: AccountLinkingConfig Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **enabled** | `boolean` | optional | Allow account linking |
11+
| **autoLink** | `boolean` | optional | Automatically link accounts with same email |
12+
| **requireVerification** | `boolean` | optional | Require email verification before linking |
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: AuthConfig
3+
description: AuthConfig Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Configuration name (snake_case) |
11+
| **label** | `string` || Display label |
12+
| **driver** | `string` | optional | The underlying authentication implementation driver |
13+
| **strategies** | `Enum<'email_password' \| 'magic_link' \| 'oauth' \| 'passkey' \| 'otp' \| 'anonymous'>[]` || Enabled authentication strategies |
14+
| **baseUrl** | `string` || Application base URL |
15+
| **secret** | `string` || Secret key for signing (min 32 chars) |
16+
| **emailPassword** | `object` | optional | |
17+
| **magicLink** | `object` | optional | |
18+
| **passkey** | `object` | optional | |
19+
| **oauth** | `object` | optional | |
20+
| **session** | `object` | optional | |
21+
| **rateLimit** | `object` | optional | |
22+
| **csrf** | `object` | optional | |
23+
| **accountLinking** | `object` | optional | |
24+
| **twoFactor** | `object` | optional | |
25+
| **userFieldMapping** | `object` | optional | |
26+
| **database** | `object` | optional | |
27+
| **plugins** | `object[]` | optional | |
28+
| **hooks** | `object` | optional | Authentication lifecycle hooks |
29+
| **security** | `object` | optional | Advanced security settings |
30+
| **email** | `object` | optional | Email configuration |
31+
| **ui** | `object` | optional | UI customization |
32+
| **active** | `boolean` | optional | Whether this provider is active |
33+
| **allowRegistration** | `boolean` | optional | Allow new user registration |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: AuthPluginConfig
3+
description: AuthPluginConfig Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Plugin name |
11+
| **enabled** | `boolean` | optional | |
12+
| **options** | `Record<string, any>` | optional | Plugin-specific options |
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: AuthStrategy
3+
description: AuthStrategy Schema Reference
4+
---
5+
6+
## Allowed Values
7+
8+
* `email_password`
9+
* `magic_link`
10+
* `oauth`
11+
* `passkey`
12+
* `otp`
13+
* `anonymous`
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: AuthenticationConfig
3+
description: AuthenticationConfig Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Configuration name (snake_case) |
11+
| **label** | `string` || Display label |
12+
| **strategies** | `Enum<'email_password' \| 'magic_link' \| 'oauth' \| 'passkey' \| 'otp' \| 'anonymous'>[]` || Enabled authentication strategies |
13+
| **baseUrl** | `string` || Application base URL |
14+
| **secret** | `string` || Secret key for signing (min 32 chars) |
15+
| **emailPassword** | `object` | optional | |
16+
| **magicLink** | `object` | optional | |
17+
| **passkey** | `object` | optional | |
18+
| **oauth** | `object` | optional | |
19+
| **session** | `object` | optional | |
20+
| **rateLimit** | `object` | optional | |
21+
| **csrf** | `object` | optional | |
22+
| **accountLinking** | `object` | optional | |
23+
| **twoFactor** | `object` | optional | |
24+
| **userFieldMapping** | `object` | optional | |
25+
| **database** | `object` | optional | |
26+
| **plugins** | `object[]` | optional | |
27+
| **hooks** | `object` | optional | Authentication lifecycle hooks |
28+
| **security** | `object` | optional | Advanced security settings |
29+
| **email** | `object` | optional | Email configuration |
30+
| **ui** | `object` | optional | UI customization |
31+
| **active** | `boolean` | optional | Whether this provider is active |
32+
| **allowRegistration** | `boolean` | optional | Allow new user registration |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: AuthenticationProvider
3+
description: AuthenticationProvider Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **type** | `string` || Provider type identifier |
11+
| **config** | `object` || Authentication configuration |
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: CSRFConfig
3+
description: CSRFConfig Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **enabled** | `boolean` | optional | |
11+
| **tokenLength** | `number` | optional | CSRF token length |
12+
| **cookieName** | `string` | optional | CSRF cookie name |
13+
| **headerName** | `string` | optional | CSRF header name |
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: DatabaseAdapter
3+
description: DatabaseAdapter Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **type** | `Enum<'prisma' \| 'drizzle' \| 'kysely' \| 'custom'>` || Database adapter type |
11+
| **connectionString** | `string` | optional | Database connection string |
12+
| **tablePrefix** | `string` | optional | Prefix for auth tables |
13+
| **schema** | `string` | optional | Database schema name |

0 commit comments

Comments
 (0)