7cb168e846867a08a9360c4cd56ebbed6d3db5c6
LoginForm mapped every signIn failure to one generic sentence. Better Auth returns distinct codes in signIn order — password check, then requireEmailVerification (EMAIL_NOT_VERIFIED), then the session.create.before hook canCreateSession (FAILED_TO_CREATE_SESSION). Map those to specific messages: unverified email, not-yet-approved account, invalid credentials. canCreateSession returns true only for ADMIN or editorial status 'active', and onEmailVerified → markPendingApproval leaves verified editorials at pending_approval until an admin approves — so the not-approved message is the common post-verification login block. Co-Authored-By: Claude <noreply@anthropic.com>
Languages
TypeScript
98.4%
CSS
1.3%
Shell
0.2%
Dockerfile
0.1%