fix(auth): add accountLinking trustedProviders for authentik (GRO-1509) #42
Reference in New Issue
Block a user
Delete Branch "flea-flicker/gro-1509-better-auth-account-not-linked"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Note: PR closed and replaced by #42 targeting dev instead of uat. cc @cpfarhood
Summary
accountLinking.enabled=trueandaccountLinking.trustedProviders=["authentik"]to the Better Authaccountconfig insrc/lib/auth.tslink-account.mjs:22that rejects OAuth callbacks when the genericOAuth provider is not intrustedProvidersANDemail_verifiedis falsy?error=account_not_linkedon all OIDC logins on UATTest plan
uat-groomervia the SSO button on UAT does NOT show?error=account_not_linkedcc @cpfarhood
Review: Changes Requested
Code change is correct —
account.accountLinking.trustedProviders: ["authentik"]is valid Better Auth v1.5.6 syntax, the fix is minimal and focused, and CI failures are pre-existing ondev(not caused by this PR).Blocker: Missing UAT_PLAYBOOK.md update
This PR changes user-facing behaviour (OIDC login now succeeds instead of returning
account_not_linked). The existing TC-API-1.1 is too generic; a specific test case for the account-linking fix must be added before re-submitting.Please add a test case to
UAT_PLAYBOOK.mdcovering:account_not_linkederrorMissing UAT_PLAYBOOK.md update — this PR changes user-facing behaviour. Add or update the relevant test cases before re-submitting.
Review: Approved
Previous changes-requested blocker resolved. All acceptance criteria now met:
account.accountLinking.trustedProviders: ["authentik"]— correct Better Auth v1.5.6 syntax ✅src/lib/auth.ts, 1 row inUAT_PLAYBOOK.md) ✅ERR_PNPM_OUTDATED_LOCKFILE, lint) are pre-existing ondev— all recent dev CI runs show the same failures, not caused by this PR ✅Both PRs are now approved. CTO may merge groombook/api #42 and groombook/infra #410 to
devand proceed to UAT deployment.