Skip to content

feat(authentication): add opt-in email restrictions on intake - #1578

Merged
kkopanidis merged 2 commits into
mainfrom
feat/email-restrictions-0.17
Aug 21, 2026
Merged

kkopanidis merged 2 commits into
mainfrom
feat/email-restrictions-0.17

Conversation

@kkopanidis

@kkopanidis kkopanidis commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add opt-in emailRestrictions for authentication email intake: local register, change-email, OAuth new accounts and anonymous upgrade, admin create/patch, gRPC userCreate, and team invites. Login, forgot-password, and magic-link for existing users stay unrestricted.
  • Block disposable domains (bundled list), plus-addressing, and configured addresses/domains. Allowlists override those rules, not reserved @anonymous.com.
  • @anonymous.com and its subdomains stay reserved for Conduit-created anonymous users, even when the feature is off.
  • Also fixes verifyChangeEmail reading verificationToken as a string.

Related

Test plan

  • nvm use 22 && npm test in modules/authentication (9 tests)
  • Enable restrictions, register with a plus-address or disposable domain — EMAIL_NOT_ALLOWED
  • Register anything@anonymous.com with the switch off — still rejected
  • Change-email token issued before enable still completes on verify

Reject disposable domains, plus-addressing, and configured denylists
when an email is accepted, and keep @anonymous.com reserved for
Conduit-created anonymous users.
@kkopanidis
kkopanidis merged commit 6f1fe7c into main Aug 21, 2026
6 of 7 checks passed
@kkopanidis
kkopanidis deleted the feat/email-restrictions-0.17 branch August 21, 2026 09:50
cursor Bot pushed a commit that referenced this pull request Aug 31, 2026
* feat(authentication): add opt-in email restrictions on intake

Reject disposable domains, plus-addressing, and configured denylists
when an email is accepted, and keep @anonymous.com reserved for
Conduit-created anonymous users.

* refactor(authentication): validate intake emails through AuthUtils.assertValidEmail
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.

2 participants