BE-M0-42 · Password sign-in back on the local stack, sign-up still off
ID BE-M0-42 · Level L0 · Pack Pack A · Local stack settings · Run order row 18b, as soon as its pull request is merged · Issue #205
On the local stack, a user signs in with email and password, and nobody can sign up (D50, R-ACC-56). BE-M0-10 set enable_signup = false under [auth.email] as well as under [auth]. The CLI's [auth.email] setting switches the whole email provider, so Auth refused password sign-in too, with email_provider_disabled, which pnpm --filter web e2e hit. The E2E logins script still worked, because it makes users through the admin API.
The fix arrived with this step's pull request: [auth.email] enable_signup = true, and [auth] enable_signup = false kept. This step loads it into your local stack and proves both halves. Staging and production set sign-up in the Dashboard (TL-M0-20), so they aren't touched.
Before
Section titled “Before”- This step's pull request is merged into main.
- You are in ~/opleet-v2/opleet,
git status --shortprints nothing, and.env.e2eexists (frompnpm db:e2e-users).
1 · Main, and a restart so Auth reads the new config
Section titled “1 · Main, and a restart so Auth reads the new config”git switch main && git pullpnpm supabase stoppnpm supabase start2 · The E2E logins, made again if the restart lost them
Section titled “2 · The E2E logins, made again if the restart lost them”pnpm db:e2e-users3 · A sign-up is refused; an E2E login signs in with its password
Section titled “3 · A sign-up is refused; an E2E login signs in with its password”Paste the block exactly as it is. Its first line, eval, fills in $API_URL, $PUBLISHABLE_KEY and $SECRET_KEY from your local stack; never replace them with values by hand, and never with staging's or production's.
The second command prints only whether a token came back, never the token or the password.
eval "$(pnpm supabase status -o env)"curl -s -X POST "$API_URL/auth/v1/signup" -H "apikey: $PUBLISHABLE_KEY" -H "Content-Type: application/json" -d '{"email":"signup-check@example.test","password":"Signup-check-1234"}'; echoset -a; . ./.env.e2e; set +acurl -s -X POST "$API_URL/auth/v1/token?grant_type=password" -H "apikey: $PUBLISHABLE_KEY" -H "Content-Type: application/json" -d "{\"email\":\"$E2E_ADMIN_EMAIL\",\"password\":\"$E2E_PASSWORD\"}" | python3 -c 'import json, sys; r = json.load(sys.stdin); print("signed in" if r.get("access_token") else r)'4 · The end-to-end tests
Section titled “4 · The end-to-end tests”Playwright starts the built app; it doesn't build it. So build from this main first, as CI does.
pnpm --filter web buildpnpm --filter web e2eExpect
Section titled “Expect”- Block 1: "Stopped supabase local development setup", then "Started supabase local development setup." with the local URLs.
- Block 2: eleven lines starting with "kept" (or "made"), then "11 logins in the E2E organization, all pools. .env.e2e updated (password not shown)."
- Block 3: first
{"code":422,"error_code":"signup_disabled","msg":"Signups not allowed for this instance"}, thensigned in. - Block 4: no
email_provider_disabled. If a test still fails for another reason, that is apps/web's, for the Frontend Engineer.
python3 -c 'import tomllib; a = tomllib.load(open("supabase/config.toml","rb"))["auth"]; print(a["enable_signup"], a["email"]["enable_signup"])'False True: sign-up off for everyone, the email provider on.
If it fails
Section titled “If it fails”- Block 3's first line returns a user or an access_token: stop. Sign-up is on; paste the output of
grep -n enable_signup supabase/config.tomlinto #205. - Block 3's second line prints
email_provider_disabled: Auth didn't reload the config. Run block 1 again, and paste the check's output if it persists. - Every
errors.spec.tsspec fails, or a spec says/e2e-faults answers 404: apps/web wasn't built from this main, or another server holds port 3100. Stop anypnpm devornext startyou have running, then run the block again, the build included. - It prints
invalid_credentials: the logins and.env.e2edisagree. Run block 2 again, then block 3. E2E_ADMIN_EMAILis empty: paste the output ofcut -d= -f1 .env.e2e, which shows only the names.
Revert the pull request with a new one, then run block 1. Nothing here touches staging or production.
Log each run as a comment on #205: the date, block 3's two lines, block 4's summary and the check's output.