Skip to content

Send the sign-in link back to Date Polling, not the suite hub - #34

Merged
JamesmarkeyUK merged 1 commit into
mainfrom
fix-otp-redirect
Jul 26, 2026
Merged

Send the sign-in link back to Date Polling, not the suite hub#34
JamesmarkeyUK merged 1 commit into
mainfrom
fix-otp-redirect

Conversation

@JamesmarkeyUK

Copy link
Copy Markdown
Contributor

signInWithOtp had no emailRedirectTo, so the link in the sign-in email fell back to the shared project's site_url (https://app.unisim.co.uk). A host who tapped it landed on the suite hub — no session here, no explanation.

The Supabase project is shared by every product, so its site_url can't be any one product's. This sends origin + Vite's BASE_URL with the trailing slash stripped, which is the exact bare form now carried in the redirect allowlist (universal-platform#108) — a listed entry without a wildcard must match exactly, and .../polling/ is not .../polling.

Found by auditing every auth redirect on the project after the same bug was fixed in Universal Family. The typed code path was always unaffected, which is why this survived unnoticed: the working path masked the broken one.

Verified: build clean.

signInWithOtp had no emailRedirectTo, so the link in the sign-in email fell
back to the shared project's site_url (https://app.unisim.co.uk). A host who
tapped it landed on the suite hub with no session here and no explanation.

The Supabase project is shared by every product, so its site_url can't be any
one product's. This sends origin + Vite's BASE_URL with the trailing slash
stripped, which is the exact bare form now carried in the redirect allowlist
(universal-platform #108) — a listed entry without a wildcard must match
exactly, and '.../polling/' is not '.../polling'.

Found by auditing every auth redirect on the project after the same bug was
fixed in Universal Family. The typed code path was always unaffected, which is
why this survived unnoticed: the working path masked the broken one.

Verified: build clean.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying universal-polling with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6aff7cf
Status:⚡️  Build in progress...

View logs

@JamesmarkeyUK
JamesmarkeyUK merged commit ed7985e into main Jul 26, 2026
1 check was pending
@JamesmarkeyUK
JamesmarkeyUK deleted the fix-otp-redirect branch July 26, 2026 07:48
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