Skip to content

feat: add granular signup disable flags - #2765

Merged
ephraimduncan merged 3 commits into
mainfrom
feat/granular-signup-disable-flags
May 9, 2026
Merged

ephraimduncan merged 3 commits into
mainfrom
feat/granular-signup-disable-flags

Conversation

@ephraimduncan

@ephraimduncan ephraimduncan commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add per-method signup disable flags so self-hosters with multiple SSO providers configured can allow signup via, e.g., OIDC only without disabling Google/Microsoft consumer signup. Existing NEXT_PUBLIC_DISABLE_SIGNUP is kept as a backward-compatible alias for the new canonical master switch DISABLE_SIGNUP.

Related Issue

Refs #2692

Changes Made

New env vars (all server-only, no NEXT_PUBLIC_ prefix):

  • DISABLE_SIGNUP — canonical master switch. Disables every signup method application-wide and gates the organisation OIDC authentication portal.
  • DISABLE_EMAIL_PASSWORD_SIGNUP — disables email/password signup only.
  • DISABLE_GOOGLE_SIGNUP, DISABLE_MICROSOFT_SIGNUP, DISABLE_OIDC_SIGNUP — block brand-new account creation through the matching SSO provider. DISABLE_OIDC_SIGNUP also blocks new-account creation through the organisation portal.
  • NEXT_PUBLIC_DISABLE_SIGNUP — kept as a legacy alias for DISABLE_SIGNUP. Either being true activates the master switch.

Testing Performed

  • DISABLE_SIGNUP=true alone → /signup redirects, ClaimAccount hidden, all OAuth callbacks (incl. org portal) reject brand-new users.
  • NEXT_PUBLIC_DISABLE_SIGNUP=true (legacy alias) → identical behaviour.
  • DISABLE_EMAIL_PASSWORD_SIGNUP=true only → email form and ClaimAccount hidden, POST /auth/email-password/signup rejects, OAuth signup still works.
  • DISABLE_GOOGLE_SIGNUP / DISABLE_MICROSOFT_SIGNUP / DISABLE_OIDC_SIGNUP only → matching button hidden on /signup, still visible on /signin, OAuth callback rejects brand-new users, existing linked users still sign in, existing email users can still link the provider.
  • DISABLE_OIDC_SIGNUP also blocks new-account creation through the organisation portal; existing org members unaffected.
  • All per-method flags set → /signup redirects to /signin.

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

Add per-method signup disable flags so self-hosters with multiple SSO
providers configured can allow signup via, e.g., OIDC only without
disabling Google/Microsoft consumer signup.

New env vars (server-only, no NEXT_PUBLIC_ prefix):

- DISABLE_SIGNUP            - master switch, replaces NEXT_PUBLIC_DISABLE_SIGNUP
                              as the canonical name; also gates the org OIDC portal
- DISABLE_EMAIL_PASSWORD_SIGNUP
- DISABLE_GOOGLE_SIGNUP
- DISABLE_MICROSOFT_SIGNUP
- DISABLE_OIDC_SIGNUP       - also blocks new-account creation through the
                              organisation authentication portal

NEXT_PUBLIC_DISABLE_SIGNUP is kept as a backward-compatible alias for
the master switch.

Per-method flags only block brand-new account creation. Existing users
with the provider already linked can still sign in, and existing email
users can still link an additional provider to their account. SSO
buttons on /signin remain visible regardless of DISABLE_X_SIGNUP since
existing users still need them; brand-new users hitting the callback
get redirected with ?error=SIGNUP_DISABLED.

The /signup loader redirects to /signin when the master switch is on
or every available method is disabled, otherwise it renders only the
still-allowed fields and SSO buttons.

Refs #2692
@vercel

vercel Bot commented May 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stg-docs Ready Ready Preview, Comment May 8, 2026 6:47am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
prd-docs Ignored Ignored May 8, 2026 6:47am
prd-openpage-api Ignored Ignored May 8, 2026 6:47am

Request Review

@github-actions github-actions Bot added type: documentation Improvements or additions to documentation apps: web Issues related to the webapp 🚨 .env changes 🚨 Be advised: PR changes .ENV - Auto-Generated by GitHub Actions on raising a PR labels May 5, 2026
@coderabbitai

coderabbitai Bot commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 977b4ab6-2f6a-44df-ab3c-4fcbd8821544

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/granular-signup-disable-flags

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🚨 @ephraimduncan has 9 pull requests awaiting review. Please consider reviewing them when possible. 🚨

@dguyen

dguyen commented May 6, 2026

Copy link
Copy Markdown
Collaborator

I haven't had a full review yet, but I don't think we should introduce a new env convention, i'd prefer just sticking with NEXT_PUBLIC for these envs

# Conflicts:
#	apps/remix/app/components/forms/signup.tsx
#	apps/remix/app/routes/_unauthenticated+/signin.tsx
#	apps/remix/app/routes/_unauthenticated+/signup.tsx
#	packages/auth/server/routes/email-password.ts
@ephraimduncan
ephraimduncan merged commit a197bf1 into main May 9, 2026
9 of 10 checks passed
@ephraimduncan
ephraimduncan deleted the feat/granular-signup-disable-flags branch May 9, 2026 01:16
scoobs-mystery-bytes pushed a commit to scoobs-mystery-bytes/documenso that referenced this pull request May 30, 2026

This branch was successfully deployed

1 active deployment
Preview – stg-docs — 047f926b Deployed May 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps: web Issues related to the webapp 🚨 .env changes 🚨 Be advised: PR changes .ENV - Auto-Generated by GitHub Actions on raising a PR type: documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants