Repository navigation
Sign in: a failed check keeps the button and says why; note Supabase's pooler for Vercel - #84
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…s pooler for Vercel The header asks /api/auth once per page whether the deployment signs people in. When that request failed, the error was recorded but `enabled` stayed false, so the Sign in button silently disappeared and the site looked like it had no login at all. Likewise a signed-in reader whose uploads list failed to load (e.g. the database unreachable) lost the account menu. Now a failed check is kept apart as `authError`: the button stays, a click asks again, and if it still can't tell, the sign-in dialog says what failed. The uploads list failing no longer discards the sign-in answer. docs/ENVIRONMENT.md: on Vercel, DATABASE_URL must be Supabase's IPv4 pooler, not the direct db.<project>.supabase.co host, which is IPv6-only and fails with getaddrinfo ENOTFOUND. That was the production outage of 2026-10-27. Verified against next dev with /api/auth intercepted: always failing (button shown, dialog names the 500), failing once then healthy (click re-checks and goes to /api/auth/login), and healthy without login configured (button hidden, as before). scripts/gate.sh passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3ezTZXsJbbkbA2BzPahCH
alisman
force-pushed
the
session/login
branch
from
October 27, 2026 20:22
4899df4 to
35af46a
Compare
This branch was successfully deployed
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.
Why
On 2026-10-27, signing in on https://cbiolab.vercel.app failed with
getaddrinfo ENOTFOUND db.xfbxtkdzvetoorarmljw.supabase.co. Production'sDATABASE_URLpointed at Supabase's direct host. That host is IPv6-only, and Vercel functions can only connect over IPv4.Already fixed outside this PR: production's
DATABASE_URLnow uses the Supabase pooler (cohort_lab_app.<project>@aws-0-us-east-2.pooler.supabase.com:6543). Thecohort_lab_approle has a new password, set with the same steps asdb:app-role. Production was redeployed and reads Postgres again (/api/campaignreturns campaigns).This PR fixes the two weak spots the outage exposed.
Changes
/api/authonce per page whether the deployment has sign-in. Before, if that request failed,enabledstayedfalseand the button simply wasn't drawn. The site looked like it had no login, with no error anywhere.authError. The button stays, and a click asks again.docs/ENVIRONMENT.mdnow explains the pooler. On Vercel,DATABASE_URLmust be Supabase's pooler, notdb.<project>.supabase.co. The doc also says how to getdb:app-roleto write the pooler URL.Verification
Tested against
next devwith Playwright intercepting/api/auth:/api/auth/login?next=/lab.scripts/gate.shpasses: lint, unit tests, full e2e and warehouse checks.Preview
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q3ezTZXsJbbkbA2BzPahCH