Skip to content

Commit 6254324

Browse files
Copilothotlong
andcommitted
Fix: Correct type names and references in tests and documentation
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent ad7a87b commit 6254324

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

docs/AUTHENTICATION_STANDARD.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const authConfig: AuthConfig = {
8888
### OAuth Example
8989

9090
```typescript
91-
const oauthConfig: BetterAuthConfig = {
91+
const oauthConfig: AuthConfig = {
9292
name: 'social_auth',
9393
label: 'Social Login',
9494
strategies: ['oauth'],
@@ -116,7 +116,7 @@ const oauthConfig: BetterAuthConfig = {
116116
### Multi-Strategy Example
117117

118118
```typescript
119-
const multiAuthConfig: BetterAuthConfig = {
119+
const multiAuthConfig: AuthConfig = {
120120
name: 'multi_auth',
121121
label: 'Multi-Strategy Auth',
122122
strategies: ['email_password', 'oauth', 'magic_link'],
@@ -168,7 +168,7 @@ const multiAuthConfig: BetterAuthConfig = {
168168
|----------|------|----------|-------------|
169169
| `name` | `string` || Configuration identifier (snake_case) |
170170
| `label` | `string` || Human-readable label |
171-
| `strategies` | `BetterAuthStrategy[]` || Enabled authentication strategies |
171+
| `strategies` | `AuthStrategy[]` || Enabled authentication strategies |
172172
| `baseUrl` | `string` || Application base URL |
173173
| `secret` | `string` || Secret key for signing (min 32 chars) |
174174

@@ -337,20 +337,20 @@ See [examples/auth-better-examples.ts](../examples/auth-better-examples.ts) for
337337

338338
## Schema Files
339339

340-
- **Zod Schema**: `packages/spec/src/system/auth-better.zod.ts`
341-
- **Tests**: `packages/spec/src/system/auth-better.test.ts`
342-
- **JSON Schema**: `packages/spec/json-schema/BetterAuthConfig.json`
343-
- **Documentation**: `content/docs/references/system/BetterAuthConfig.mdx`
340+
- **Zod Schema**: `packages/spec/src/system/auth.zod.ts`
341+
- **Tests**: `packages/spec/src/system/auth.test.ts`
342+
- **JSON Schema**: `packages/spec/json-schema/AuthConfig.json`
343+
- **Documentation**: `content/docs/references/system/AuthConfig.mdx`
344344

345345
## Type Safety
346346

347347
All schemas are defined using Zod and TypeScript types are inferred automatically:
348348

349349
```typescript
350350
import type {
351-
BetterAuthConfig,
352-
BetterAuthProvider,
353-
BetterAuthStrategy,
351+
AuthConfig,
352+
StandardAuthProvider,
353+
AuthStrategy,
354354
OAuthProvider,
355355
SessionConfig,
356356
// ... and more
@@ -362,13 +362,13 @@ import type {
362362
Following ObjectStack conventions:
363363

364364
- **Configuration Keys** (TypeScript properties): `camelCase` (e.g., `maxAttempts`, `emailPassword`)
365-
- **Machine Names** (Data values): `snake_case` (e.g., `name: 'better_auth'`, `strategy: 'email_password'`)
365+
- **Machine Names** (Data values): `snake_case` (e.g., `name: 'main_auth'`, `strategy: 'email_password'`)
366366

367367
## Resources
368368

369369
- [Better-Auth Documentation](https://better-auth.com)
370370
- [ObjectStack Documentation](https://objectstack.ai)
371-
- [JSON Schema Reference](../packages/spec/json-schema/BetterAuthConfig.json)
371+
- [JSON Schema Reference](../packages/spec/json-schema/AuthConfig.json)
372372

373373
## License
374374

packages/spec/src/system/auth.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import {
1515
AuthPluginConfigSchema,
1616
AuthConfigSchema,
1717
StandardAuthProviderSchema,
18-
type AuthenticationConfig,
19-
type AuthenticationProvider,
18+
type AuthConfig,
19+
type StandardAuthProvider,
2020
type OAuthProvider,
2121
} from "./auth.zod";
2222

0 commit comments

Comments
 (0)