Skip to content
SprecherEast
Issue 266

Decide: resident accounts on Payload's own sign-in or on Better Auth

Back to our plan
Done
enhancementauthpriority: high

Problem

Three account features are planned separately, and each was heading toward custom code: email confirmation (#183), the resident account offer (#187) and social sign-in (#188, decision record 0010 in #261). Under the native-first rule (#262) they should share one sign-in foundation. Picking it is a real trade-off, so it waits for the owner.

Question for the owner

Which sign-in foundation should resident accounts use?

  • A. Payload's own (recommended): sign-up, email verification, forgot and reset password are already built into Payload. Google and Facebook sign-in come later through a small plugin. The fewest new pieces, and the admin sign-in stays as it is.
  • B. Better Auth (payload-auth plugin): one library for verification, magic links and social sign-in. It's a community plugin, not an official one, and it replaces Payload's sign-in.

Reply A or B. Until then, this issue, #187 and #188 wait.

Findings (native first, #262)

  1. Native: Payload 3.91 auth covers sign-up (create access), email verification (auth.verify), forgot and reset password with expiry and a resend limit, lockout, and sessions (auth operations, opens in a new tab, auth emails, opens in a new tab). Gaps: no social sign-in; the verify token has no expiry.
  2. Official plugin: none for social sign-in.
  3. Open source: payload-auth (Better Auth; MIT, 3.0.0 in Aug 2026) covers everything but replaces Payload's sign-in; payload-oauth2 (MIT, 1.0.21) adds social sign-in on top of Payload's (comparison, opens in a new tab).
  4. Our own: two custom endpoints with openid-client (#261): only if neither A nor B works.

Acceptance criteria

  • Not done: The owner picks A or B; his answer is quoted here.
  • Not done: #187, #188 and PR #261 are re-scoped to match, and the cleanup tasks in the epic that depend on it go ahead.

Area

auth

Priority

High


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab