You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/guides/authentication.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -567,14 +567,14 @@ try {
567
567
}
568
568
```
569
569
570
-
### Migration from Other Systems
570
+
### ObjectStack Field Naming
571
571
572
-
The plugin uses Better-Auth's native naming conventions (camelCase for fields, no table prefixes) to make migration from existing Better-Auth implementations seamless:
572
+
The plugin uses ObjectStack's snake_case naming convention for field names, which is required by the ObjectStack protocol:
573
573
574
-
- Table names: `user`, `session`, `account`, `verification` (no `auth_` prefix)
575
-
- Field names: `emailVerified`, `createdAt`, `userId` (camelCase)
574
+
- Table names: `user`, `session`, `account`, `verification` (compatible with better-auth)
575
+
- Field names: `email_verified`, `created_at`, `user_id` (snake_case)
576
576
577
-
If you're migrating from an existing Better-Auth setup, your data will work without modification.
577
+
The ObjectQL adapter automatically handles field name transformation between better-auth's expectations and ObjectStack's snake_case convention, providing seamless integration while maintaining protocol compliance.
The plugin uses [better-auth](https://www.better-auth.com/) for robust, production-ready authentication functionality. All requests are forwarded directly to better-auth's universal handler, ensuring full compatibility with all better-auth features. Data persistence is handled by ObjectQL using **better-auth's native naming conventions**(camelCase) to ensure seamless migration for existing better-auth users.
43
+
The plugin uses [better-auth](https://www.better-auth.com/) for robust, production-ready authentication functionality. All requests are forwarded directly to better-auth's universal handler, ensuring full compatibility with all better-auth features. Data persistence is handled by ObjectQL using **ObjectStack's snake_case naming conventions**for field names to maintain consistency across the platform.
44
44
45
45
## Installation
46
46
@@ -185,16 +185,16 @@ This architecture provides:
185
185
The plugin uses **ObjectQL** for data persistence instead of third-party ORMs:
186
186
187
187
```typescript
188
-
// Object definitions use better-auth's native naming conventions
188
+
// Object definitions use ObjectStack's snake_case naming conventions
189
189
exportconst AuthUser =ObjectSchema.create({
190
-
name: 'user', // better-auth native table name
190
+
name: 'user', // better-auth compatible table name
The `createObjectQLAdapter()` function bridges better-auth's database interface to ObjectQL's IDataEngine using better-auth's native naming conventions:
223
+
The `createObjectQLAdapter()` function bridges better-auth's database interface to ObjectQL's IDataEngine with field name transformation:
224
224
225
225
```typescript
226
-
// Better-auth → ObjectQL Adapter (no name conversion needed)
0 commit comments