Send the sign-in link back to Date Polling, not the suite hub - #34
Merged
Conversation
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.
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.
signInWithOtphad noemailRedirectTo, so the link in the sign-in email fell back to the shared project'ssite_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_urlcan't be any one product's. This sendsorigin+ Vite'sBASE_URLwith 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.