diff --git a/UAT_PLAYBOOK.md b/UAT_PLAYBOOK.md index 42a0b07..cb02d20 100644 --- a/UAT_PLAYBOOK.md +++ b/UAT_PLAYBOOK.md @@ -38,6 +38,7 @@ GroomBook API is a Hono-based REST service (TypeScript/Node.js) powering the pet | TC-API-1.13 | Name fallback — user.name present | Auto-provision where Better-Auth user has name set | Staff name = user.name value from user table | | TC-API-1.14 | Name fallback — no name, email present | Auto-provision where Better-Auth user has name = null, email = "test@example.com" | Staff name = "test" (email prefix before @) | | TC-API-1.15 | Name fallback — no name, no email | Auto-provision where Better-Auth user has name = null, email = null | Staff name = "Unknown" | +| TC-API-1.16 | OIDC login — Terraform-provisioned user | Initiate OIDC login as any UAT persona (uat-super, uat-groomer, uat-customer, uat-tester), complete authentik callback | 200 OK, session created — no account_not_linked error | ### 4.2 Client Management diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 209e9d6..9e78740 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -251,6 +251,10 @@ export async function initAuth(): Promise { }, }, account: { + accountLinking: { + enabled: true, + trustedProviders: ["authentik"], + }, storeStateStrategy: "cookie" as const, }, emailAndPassword: {