mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:41:08 +02:00
- Update auth.controller.spec.ts to expect accessToken/refreshToken/expiresIn - Refactor jwt-validation.spec.ts to test minimal claims (sub, email, role, sid) - Remove B2B/B2C org and credit_balance claims from tests (fetched via API now) - Add Better Auth CLI config for schema generation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
671 B
TypeScript
26 lines
671 B
TypeScript
/**
|
|
* Better Auth CLI configuration file
|
|
* This file is used by the Better Auth CLI to generate the schema.
|
|
* Run: npx @better-auth/cli generate --output ./src/db/schema/better-auth-schema.ts
|
|
*/
|
|
|
|
import { betterAuth } from 'better-auth';
|
|
import { organization } from 'better-auth/plugins/organization';
|
|
import { jwt } from 'better-auth/plugins/jwt';
|
|
|
|
export const auth = betterAuth({
|
|
// Use simple URL-based connection for CLI
|
|
database: {
|
|
type: 'postgres',
|
|
url: 'postgresql://manacore:devpassword@localhost:5432/manacore',
|
|
},
|
|
emailAndPassword: {
|
|
enabled: true,
|
|
},
|
|
plugins: [
|
|
organization({
|
|
allowUserToCreateOrganization: true,
|
|
}),
|
|
jwt(),
|
|
],
|
|
});
|