Repository navigation
fix(auth): refuse account creation from disposable email domains for every provider - #9516
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The PR appears safe to merge; no new blocking issue was found. SummaryThe PR blocks disposable email domains when hosted accounts are created, across sign-up providers.
Reviews (2) · Last reviewed commit: "fix(auth): keep permanent mail-relay ali..." · Reviewed by Greptile |
Comments Outside DiffThese findings could not be posted inline.
|
|
Re: permanent aliases ( |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
databaseHooks.user.create.before, so it covers Google, GitHub, Microsoft, SSO, and email signups alike. Previously the only disposable check was the ~20-domain client-side list inquickValidateEmail, which OAuth signups never hitdisposable-email-domains.json, ~98.7k domains) is the union ofdisposable/disposable-email-domains(MIT) anddisposable-email-domains/disposable-email-domains(CC0) at pinned commits — no new package dependency, the reviewed diff is what shipsx.mailinator.com), lazy-loaded on first account creation so no other module pays the parse at startup; fails open (logs, allows signup) if the list can't load, and a failed load is retried rather than cached!isHosted) is unchanged/oauth-errorwith a clear message (use a permanent email address) instead of the generic "try again" — mapped for both Better Auth 1.6 (message slug) and 1.7 (error code) redirect shapesType of Change
Testing
isDisposableEmailunder Bun: disposable domains, subdomains, and mixed case refused; Gmail, Outlook, iCloud, Proton, DuckDuckGo/Firefox Relay, corporate and.edudomains,example.test, and missing/empty emails allowed; 1,000 checks in 0.5ms after the first loaduser.create.beforeAPIErroris redirectedcheck:audits, and test suites in CIChecklist
test-auditauthoring gate)