Skip to content

refactor: split the auth config and credentials - #53

Merged
WhiteMuush merged 2 commits into
developfrom
refactor/split-auth-credentials
Oct 13, 2026
Merged

WhiteMuush merged 2 commits into
developfrom
refactor/split-auth-credentials

Conversation

@WhiteMuush

Copy link
Copy Markdown
Owner

Part of #30. The Better Auth configuration moves its sign-in method policy, login OTP and environment reading into their own files.

The credentials source catalog and drawer move their stats cards, configuration section and view helpers out. No behaviour change.

server.ts goes from 313 to 92 lines: the sign-in policy hook moves to method-policy.ts, the email code sender to login-otp.ts, the environment switches (E2E rate limit, test trusted origins, WebAuthn) to server-env.ts. The set of code lines is identical, only comments and imports change; each comment is one sentence and the full reasoning moves to the wiki Authentication page.
SourceDrawer goes from 349 to 150 lines and SourceCatalog from 215 to 144: the configuration section, the stats cards and the view helpers get their own files.
@WhiteMuush
WhiteMuush merged commit 6c386da into develop Oct 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant