Skip to content

Feat/sign in gate pilot - #18

Merged
pip-install-python merged 2 commits into
mainfrom
feat/sign-in-gate-pilot
Aug 20, 2026
Merged

Feat/sign in gate pilot#18
pip-install-python merged 2 commits into
mainfrom
feat/sign-in-gate-pilot

Conversation

@pip-install-python

Copy link
Copy Markdown
Owner

No description provided.

pip-install-python and others added 2 commits August 20, 2026 15:03
Sign-in on this host reached 2plot.ai, succeeded, and left the user there.
No error on either side, client or server — which is why it survived a
deploy.

CLERK_SATELLITE_SIGN_IN_REDIRECT was unset, so dash-clerk-auth's
buildSatelliteRedirect() returned null and both click handlers (lib/auth.py's
#clerk-login-button delegation and assets/auth_gate.js's #auth-gate-*) fell
through to Clerk.redirectToSignIn(). That hops to CLERK_SIGN_IN_URL —
accounts.2plot.ai, Clerk's HOSTED Account Portal. The hub's Dash app is never
in the loop, so none of its returnTo machinery runs: not the whitelist check
against allowed_redirect_origins(), not the force-redirect, not the
/onboarding auto-open. Whether the user comes back is then decided entirely
by the Clerk dashboard's own allowed-redirect list, and when that does not
name this host ClerkJS drops signInForceRedirectUrl silently and uses the
portal's default. Successful sign-in, wrong destination, nothing logged.

Set to https://2plot.ai/onboarding, the button navigates to a page on the
hub's own app, which validates ?returnTo= against a list that already
contains https://leaflet.2plot.dev and sends the user home. auth_gate.js
appends &mode=signup, which that page reads to open the sign-UP modal, so one
value serves both buttons.

The variable is read by dash-clerk-auth from the environment directly, so
lib/auth.py does not pass it through — declaring it in render.yaml is the
whole fix. This file's own note is why it was missing: it said to set it
"only once 2plot.ai has a page that honours ?returnTo=". That page shipped;
nobody came back. So register() now WARNS at boot whenever satellite mode is
on and this is unset, because a misconfiguration with no error anywhere needs
something to say it out loud.

DEPLOYMENT.md gains the two-path table, and a blueprint-vs-dashboard drift
section: Render applies envVars on a blueprint SYNC, not on autoDeploy, so
the live service is also missing PAGE_VISIBILITY_FILE (control-board toggles
reset every deploy), AD_SERVER_URL (no ads), ANALYTICS_GEO_LOOKUP, and
carries two Gen-1 variables nothing reads. PYTHONUNBUFFERED is correctly
absent — it is a Dockerfile ENV here, as in the boilerplate.

182 passed, flake8 clean, render.yaml parses.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CLERK_SATELLITE_SIGN_IN_REDIRECT reads like a boolean and is not — it is a
destination. buildSatelliteRedirect() builds `<value>?returnTo=<here>` by
plain concatenation, so a truthy non-URL resolves against THIS host:
CLERK_SATELLITE_SIGN_IN_REDIRECT=true sends the Sign In button to
https://leaflet.2plot.dev/true?returnTo=..., which 404s. That is worse than
leaving it unset, where at least the Clerk Account Portal fallback signs the
user in before stranding them.

dash-clerk-auth notices and does not act on it: one logger.warning, then it
uses the value anyway. That warning lands several screens up in the boot
output, nowhere near the other [auth] lines a deploy check reads.

So the guard added in c046719 now covers both mistakes — unset, and set to
something that is not an absolute http(s) URL — and says which one happened.
Verified against '', 'true', a bare host, and the correct URL.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pip-install-python
pip-install-python merged commit f9085e1 into main Aug 20, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant