Fix guide · updated 2026-11-16
Supabase "Anonymous sign-ins are disabled"
AuthApiError: Anonymous sign-ins are disabled · anonymous_provider_disabled · 422
Your sign-up form fails with "Anonymous sign-ins are disabled", and you never asked for anonymous users. Or you did call signInAnonymously() and want the right switch. We ran Supabase's real Auth server and supabase-js 2.119 on our machine to see exactly when it says this. The surprise: an ordinary sign-up with an empty email gets this error too, and turning anonymous sign-ins on only hides that bug.
What the error means
Supabase Auth answers HTTP 422, code anonymous_provider_disabled, when a request asks for an anonymous user and your project doesn't allow them. Two calls do that:
supabase.auth.signInAnonymously(),supabase.auth.signUp()with no email and no phone number. Supabase treats a sign-up without either as an anonymous sign-in.
This is what the browser's Network tab shows, on POST /auth/v1/signup:
422 {"code":"anonymous_provider_disabled","message":"Anonymous sign-ins are disabled"}
1. Your sign-up form sent an empty email
If you see this on an email-and-password sign-up, the email never reached the call. In our test, each of these got "Anonymous sign-ins are disabled":
supabase.auth.signUp({ email: '', password }) // empty field
supabase.auth.signUp({ email: undefined, password }) // wrong variable or field name
supabase.auth.signUp({ email: null, password })
supabase.auth.signUp({ phone: '', password })
Supabase checks for the missing email first: even an empty password got this error, not the password one.
The usual causes: the input isn't wired to the state your code reads (in React, a value with no onChange), the submit handler reads form.mail or data.Email when the field is called email, or a sign-up spread over several screens lost the email on the way. Log the object you pass to signUp right before the call. Then refuse to send it without an email:
const email = emailInput.trim();
if (!email) {
setError('Enter your email address.');
return;
}
const { data, error } = await supabase.auth.signUp({ email, password });
For comparison, in the same test: leaving the email key out entirely stopped inside supabase-js ("You must provide either an email or phone number and a password"), an email of only spaces got "Unable to validate email address: invalid format", and an empty email on the sign-in form got "missing email or phone".
2. Don't fix that by turning anonymous sign-ins on
With anonymous sign-ins on, the same broken form seems to work. In our test, signUp({ email: '', password, options: { data: { name } } }) came back with a session for a new user with no email and is_anonymous: true. Supabase kept the name and dropped the password: nothing was stored. The person believes they have an account. Once they sign out or clear their browser, it's gone, with no email or password to get back in.
3. You do want guest users
Turn on Allow anonymous sign-ins in your Supabase dashboard, under Authentication → Sign In / Providers → User Signups. New projects start with it off. In local development, set enable_anonymous_sign_ins = true under [auth] in supabase/config.toml, then restart the local stack.
The errors that came next in our test, once it was on:
- "Signups not allowed for this instance" (HTTP 422,
signup_disabled): Allow new users to sign up is off. An anonymous user is a new user, so that switch must be on too. See Supabase "Signups not allowed for this instance". - "captcha protection: request disallowed (no captcha_token found)" (HTTP 400,
captcha_failed): CAPTCHA protection is on, which Supabase recommends for anonymous sign-ins. Pass the token from your CAPTCHA widget:signInAnonymously({ options: { captchaToken } }). Every cause of this one is in our CAPTCHA guide. - "Request rate limit reached" (HTTP 429,
over_request_rate_limit): by default, 30 anonymous sign-ins per hour from one IP address. In our test the 31st was refused, while a normal sign-up with an email still went through. Automated tests and pages that sign in on every load use it up fast. The number is under Authentication → Rate Limits → Rate limit for anonymous users. The other limits are in our rate-limit guide.
4. signInAnonymously() makes a new user every time
In our test, the same client calling signInAnonymously() twice got two different users, and its session moved to the second one. Whatever the first user saved (a cart, a draft, a score) stays in your tables, but nobody can reach it anymore. Sign in only when there's no session yet:
const { data: { session } } = await supabase.auth.getSession();
if (!session) {
const { error } = await supabase.auth.signInAnonymously();
if (error) console.error(error);
}
Anonymous users count as signed in
In our test, an anonymous user's token carried role: authenticated, the same as a user with an email, plus is_anonymous: true. So every RLS policy written for signed-in users applies to them too: a policy that lets any signed-in user read a table now lets any visitor read it, one click away. Before you turn the switch on, make the policies meant for real accounts check the claim, as Supabase's docs show:
(select (auth.jwt()->>'is_anonymous')::boolean) is false
If an AI tool built your app
Give your AI tool this prompt:
On the sign-up form, make sure the email the person typed reaches supabase.auth.signUp: trim it, and if it's empty, show "Enter your email address." and don't call Supabase. Never call signUp without an email. If the app uses anonymous (guest) users, call supabase.auth.signInAnonymously() only when supabase.auth.getSession() returns no session, never on every page load. Don't change anything else.
Not quite your error?
- Sign-up is closed for everyone: Supabase "Signups not allowed for this instance".
- Sign-up refuses the email address: Supabase "Unable to validate email address: invalid format".
- Sign-up refuses the password: Supabase "Password should be at least 6 characters".
- Sign-up says the email is taken: Supabase "User already registered".
- Sign-in (not sign-up) with an empty email: Supabase "missing email or phone".
Still stuck?
Open the Auth logs in your Supabase dashboard at the time of the error. A POST /signup refused with anonymous_provider_disabled from a page where people type an email means the email was empty when it left: log the object your code passes to signUp, right before the call.
Other Supabase problems? See Supabase fixes.