Supabase signup_disabled: new accounts are turned off
On this page
Short answer
Your Supabase project has Allow new users to sign up turned off, so the Auth server refuses to create any new account and returns the signup_disabled code. The official description is: "Sign ups (new account creation) are disabled on the server." Turn that setting on if strangers should be able to register. A different message, "Signups not allowed for otp", is otp_disabled: either OTP sign-in is disabled in the project, or shouldCreateUser was set to false and that email or phone has no account yet.
Find a fix pack
Checklists and prompts for Supabase security, Stripe payments and deploys. Each pack is $24, or $49 for all three.
The exact error you'll see
The Auth server sends the error back as JSON. The source struct uses the field names code (the HTTP status), error_code and msg. In the browser, that JSON is the network response for /signup or /otp. In supabase-js it appears as error.code and error.message.
The shape, from the Auth source, looks like this (values change with the error):
{
"code": 422,
"error_code": "signup_disabled",
"msg": "Signups not allowed for this instance"
}
Project-wide signup switch (HTTP 422, error_code: signup_disabled):
Signups not allowed for this instance
Source: signup.go (opens in a new tab)
Email provider switched off (HTTP 400, error_code: email_provider_disabled):
Email signups are disabled
Source: signup.go (opens in a new tab). The error-codes table describes this code as: "Signups are disabled for email and password."
Magic link or OTP, when a new user would have to be created but must not be (HTTP 422, error_code: otp_disabled):
Signups not allowed for otp
Source: otp.go (opens in a new tab). The error-codes table describes otp_disabled more broadly as: "Sign in with OTPs (magic link, email OTP) is disabled. Check your server's configuration."
Two neighbouring magic-link messages use the same email_provider_disabled code, with different msg text. They are easy to mix up with the signup errors:
Email logins are disabled
Login with magic link is disabled
Source: magic_link.go (opens in a new tab)
Applies to
- Supabase Auth (the supabase/auth server), on hosted and self-hosted projects
@supabase/supabase-jsv2:signUp()andsignInWithOtp()- Lovable, Bolt, Cursor or any app that calls those methods
- The settings involved: Allow new users to sign up in Auth general configuration, the email provider's settings, and
DISABLE_SIGNUPon self-hosted Auth
Why it happens
- Allow new users to sign up is off. Supabase's general configuration docs say that if this config is disabled, "only existing users can sign in." The server checks
config.DisableSignupfirst in the signup handler and returnssignup_disabled. - The email provider is disabled. When email sign-in is off,
signUp()with an email returnsemail_provider_disabled. shouldCreateUser: falseon an unknown email or phone. The supabase-js type forsignInWithOtp()says this option: "If set to false, this method will not create a new user. Defaults to true." In the Auth source,CreateUseralso defaults totrue. If it is false and no user exists, the server returnsotp_disabledwith "Signups not allowed for otp".- On self-hosted Auth,
DISABLE_SIGNUPis true. The Auth README says: "When signup is disabled the only way to create new users is through invites. Defaults tofalse, all signups enabled."
How to fix it, step by step
- Log
error.codeanderror.name, not only the message. Supabase's error-codes guide says: "Always useerror.codeanderror.nameto identify errors, not string matching on error messages." It also says: "Avoid relying solely on HTTP status codes, as they may change unexpectedly." In a browser app:
const { data, error } = await supabase.auth.signUp({
email,
password,
})
if (error) {
console.log(error.code, error.name, error.message)
}
-
If the code is
signup_disabledand new people should be able to register, turn on Allow new users to sign up in the project's Auth configuration. The official wording of the setting is: "Users will be able to sign up. If this config is disabled, only existing users can sign in." The public docs name the setting; they do not give a dashboard click path. -
If the code is
email_provider_disabled, enable the email provider. Confirm Email sits in the same area. Supabase says that option "can be found in the email provider under the provider-specific configuration." With Confirm Email on, "Users will need to confirm their email address before signing in for the first time." That is a separate switch from signup itself: turning signup on does not confirm the address. -
If the code is
otp_disabled, first confirm OTP / magic-link sign-in is enabled in the project (that is what the error-codes table points you to). Then check the client call. If you want a first visit to create the account, do not passshouldCreateUser: false(it already defaults to true):
const { data, error } = await supabase.auth.signInWithOtp({
email,
// options.shouldCreateUser defaults to true
})
If you meant to refuse unknown emails, keep shouldCreateUser: false and create the user first (for example with an invite), then let them request the OTP.
-
On self-hosted Auth, set
DISABLE_SIGNUPtofalseand restart the Auth service. Leave ittrueonly when invites should be the only way to add users. -
If you meant to keep signup closed, remove the sign-up form from public pages and invite users instead. Retrying the same request will not change the server's answer.
If that didn't work
- A "Send magic link" or "Email me a code" button can still return "Signups not allowed for this instance", even when your code never calls
signUp(). In the Auth source, a magic-link request for an email with no account calls the signup handler. With signups off, that path hits the sameDisableSignupcheck. - If the message is "Email logins are disabled" or "Login with magic link is disabled", the email provider or magic-link flag is off. That is not the project-wide signup switch. Turn the matching provider setting on, then retry.
- If signup is already on and you still see
signup_disabled, you are probably talking to a different project than the one you just edited (a preview project's URL and anon key, for example). Check which project URL and anon key the app is actually using. signup_disabledandotp_disabledare both HTTP 422. Reading only the status code cannot tell them apart. Theerror_codefield can.
What the docs don't spell out
- The official error-codes line for
otp_disabledtalks about OTP sign-in being disabled. The Auth source also returns that same code, with the message "Signups not allowed for otp", whencreate_useris false and the email or phone is not already a user. If OTP is clearly enabled in the dashboard, look atshouldCreateUsernext. (otp.go (opens in a new tab), error codes (opens in a new tab)) - The order of checks tells you what to fix. The project-wide switch is checked first and the email provider second. If you see
signup_disabled, turning on the email provider alone will not fix it. (signup.go (opens in a new tab)) - Confirm Email is not the signup switch. With Confirm Email on, a successful
signUp()can still leave the user unable to sign in until they confirm. That is expected, and it is a different problem fromsignup_disabled.
How to verify it worked
- In DevTools → Network, trigger sign-up with an email that has never been used. The
/signupresponse should have noerror_code, and the user should appear in the project's users list. - If you use magic links or email OTP, request one for a second new email. You should get the message or email, not
signup_disabledorotp_disabled. - If signup is meant to stay closed, the public page no longer offers sign-up, a direct
signUp()still returnssignup_disabled, and an invited user can still sign in. - Confirm you logged
error.code. If you only matched on the message string, a later wording change would hide a regression.
Official docs links
- signup.go (opens in a new tab): exact
signup_disabledandemail_provider_disabledmessages, and the order of the checks - otp.go (opens in a new tab): exact
otp_disabledmessage and thecreate_userlookup - magic_link.go (opens in a new tab): a new-user magic link goes through the signup handler; "Email logins are disabled" and "Login with magic link is disabled"
- apierrors.go (opens in a new tab): the JSON fields
code,error_codeandmsg - Auth README (opens in a new tab):
DISABLE_SIGNUPand invite-only behavior - General configuration (opens in a new tab): Allow new users to sign up, and where Confirm Email lives
- Auth error codes (opens in a new tab): official descriptions, and the advice to branch on
error.code - auth-js types.ts (opens in a new tab):
shouldCreateUser"Defaults to true"
Related fixes
Tool to consider: Supabase.
Find a fix pack
Checklists and prompts for Supabase security, Stripe payments and deploys. Each pack is $24, or $49 for all three.