Repository navigation
dev2 supabase-stack: turn off phone signup autoconfirm - #138
Merged
Merged
Conversation
Upstream .env.example ships ENABLE_PHONE_SIGNUP=true and
ENABLE_PHONE_AUTOCONFIRM=true. With no SMS provider configured, anyone can
POST /auth/v1/signup {phone, password} with a made-up number and get a live
session, bypassing the email confirmation the template already enforces.
Verified on smshub.dev 2026-10-06; 21 other dev2 stacks carry the same env.
Autoconfirm is now always off, and phone signup is on only when the site's
volumes/auth/auth.env configures GOTRUE_SMS_PROVIDER or a send-SMS hook
(qrypt.chat), so a re-run does not break a site that really uses phone auth.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan32 finding(s) HIGH/CRITICAL: 7 | MEDIUM: 12 | LOW: 13
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every self-hosted Supabase stack on dev2 inherits upstream's
.env.exampledefaultsENABLE_PHONE_SIGNUP=trueandENABLE_PHONE_AUTOCONFIRM=true. The template already forcesENABLE_EMAIL_AUTOCONFIRM=false, but the phone path stays open: with no SMS provider configured,POST /auth/v1/signup {"phone":"+1555...","password":"..."}with the anon key returns a live session for any made-up number. Nothing is verified.Proven on smshub.dev on 2026-10-06 (the test user was deleted). A
docker inspectof every GoTrue container on dev2 shows the sameGOTRUE_EXTERNAL_PHONE_ENABLED=true+GOTRUE_SMS_AUTOCONFIRM=trueon all 21 other stacks.Change
dev2/templates/supabase-stack.sh:ENABLE_PHONE_AUTOCONFIRM=false, always.ENABLE_PHONE_SIGNUPistrueonly when the site'svolumes/auth/auth.envsetsGOTRUE_SMS_PROVIDERorGOTRUE_HOOK_SEND_SMS_ENABLED(today that is only qrypt.chat, which has 355 phone users). Otherwise it isfalse, so re-running the template on a phone-auth site does not break it.I tested both branches of the snippet against a scratch
.env.bash -npasses. README row updated.Not done
This is not rolled out to the other stacks. Re-running the template (or flipping the two
.envkeys and recreatingauth) on each site is a separate step. smshub.dev was fixed by hand:.env.bak-003was taken as a backup, then only the auth container was recreated.🤖 Generated with Claude Code