What problem does it solve?
Prevents users from signing up when your Phoenix app should restrict registration, while avoiding broken or confusing UI by making signup behavior controllable via environment configuration.
Core Features & Use Cases
- ENV-controlled runtime toggle: Adds a runtime config value driven by an environment variable (including a boolean_env helper when missing) so registration can be enabled in dev/test and disabled in prod by default.
- Controller guard for safety: Introduces a plug in the registration controller that redirects and flashes an error when registration is disabled.
- Conditional login UI: Hides the "Sign up" link on the login page when registration is turned off, matching backend enforcement.
Use case: You deploy a production Phoenix 1.8 app and need to temporarily close new user registrations without removing auth routes, templates, or controller logic.
Quick Start
Ask an AI agent to run the bootstrap-registration-toggle skill on your Phoenix 1.8 app generated with phx.gen.auth so it adds an ENV-based registration toggle, protects the registration controller with a plug, and conditionally hides the signup link on the login page.