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-js v2: signUp() and signInWithOtp()
  • 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_SIGNUP on 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.DisableSignup first in the signup handler and returns signup_disabled.
  • The email provider is disabled. When email sign-in is off, signUp() with an email returns email_provider_disabled.
  • shouldCreateUser: false on an unknown email or phone. The supabase-js type for signInWithOtp() says this option: "If set to false, this method will not create a new user. Defaults to true." In the Auth source, CreateUser also defaults to true. If it is false and no user exists, the server returns otp_disabled with "Signups not allowed for otp".
  • On self-hosted Auth, DISABLE_SIGNUP is true. The Auth README says: "When signup is disabled the only way to create new users is through invites. Defaults to false, all signups enabled."

How to fix it, step by step

  1. Log error.code and error.name, not only the message. Supabase's error-codes guide says: "Always use error.code and error.name to 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)
}
  1. If the code is signup_disabled and 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.

  2. 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.

  3. 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 pass shouldCreateUser: 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.

  1. On self-hosted Auth, set DISABLE_SIGNUP to false and restart the Auth service. Leave it true only when invites should be the only way to add users.

  2. 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 same DisableSignup check.
  • 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_disabled and otp_disabled are both HTTP 422. Reading only the status code cannot tell them apart. The error_code field can.

What the docs don't spell out

  • The official error-codes line for otp_disabled talks about OTP sign-in being disabled. The Auth source also returns that same code, with the message "Signups not allowed for otp", when create_user is false and the email or phone is not already a user. If OTP is clearly enabled in the dashboard, look at shouldCreateUser next. (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 from signup_disabled.

How to verify it worked

  1. In DevTools → Network, trigger sign-up with an email that has never been used. The /signup response should have no error_code, and the user should appear in the project's users list.
  2. If you use magic links or email OTP, request one for a second new email. You should get the message or email, not signup_disabled or otp_disabled.
  3. If signup is meant to stay closed, the public page no longer offers sign-up, a direct signUp() still returns signup_disabled, and an invited user can still sign in.
  4. Confirm you logged error.code. If you only matched on the message string, a later wording change would hide a regression.

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.