Skip to content

Add emailAndPassword.disableSignUp to BetterAuth for invite-only apps#496

Merged
kaihaase merged 3 commits intodevelopfrom
feature/disable-signup
Feb 7, 2026
Merged

Add emailAndPassword.disableSignUp to BetterAuth for invite-only apps#496
kaihaase merged 3 commits intodevelopfrom
feature/disable-signup

Conversation

@pascal-klesse
Copy link
Member

Pass through to Better-Auth's native disableSignUp config and add early guard checks in custom GraphQL/REST sign-up endpoints (LTNS_0026 error). Expose signUpEnabled in features endpoint. Default false (backward compatible).

@kaihaase kaihaase force-pushed the feature/disable-signup branch from 2452685 to f4c7ec3 Compare February 7, 2026 08:01
pascal-klesse and others added 3 commits February 7, 2026 09:56
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…y apps

Adds configurable sign-up disabling via betterAuth.emailAndPassword.disableSignUp.
When enabled, REST and GraphQL sign-up endpoints return LTNS_0026 error while
sign-in continues to work for existing users.

Defense in Depth: Custom ensureSignUpEnabled() check on CoreBetterAuthService
fires before BetterAuth API calls (structured error), native disableSignUp flag
acts as safety net for direct API access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kaihaase kaihaase force-pushed the feature/disable-signup branch from f4c7ec3 to 784cdf7 Compare February 7, 2026 09:04
@kaihaase kaihaase merged commit 1ea0246 into develop Feb 7, 2026
1 check passed
@kaihaase kaihaase deleted the feature/disable-signup branch February 7, 2026 09:11
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