Repository navigation
Consent links: optional return_url sends the person back once connected - #148
Conversation
A link may carry return_url (https, on consent.return_origins, at most 512 characters). The done page then says "Taking you back…", refreshes there after 3 seconds and shows a button to go at once; without one it keeps "You can close this page." Covers OAuth sign-in, pasted values and the Drive page. The Cloudflare worker sends RETURN_ORIGINS as return_origins and re-sends consent when they change.
Decision: Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
|
Deployed (live base 31ac165 + this patch, patch-id identical): Worker fefd7478, container v17, RETURN_ORIGINS=https://app.askphobos.ai. Live smoke passed. Brief Worker rollback during the container rollout, see #149. Receipt: /root/fleet-tools/state/phobos-dev/keyring-deploy-return-20261114/RECEIPT.md. |
Owner request (Phobos, 2026-11-14): after Google sign-in the page should go back to the dashboard on its own after a few seconds.
consent.return_origins(policy): https origins only, exact match;Consent.ReturnAllowed.POST /links(and/accounts/{id}/links, same handler) takes optionalreturn_url: https, no userinfo, origin in the allowlist, ≤512 chars, no;/whitespace (keeps the meta refresh value unambiguous). Stored on the link and the sign-in.<meta http-equiv=refresh content="3;url=…">, and a "Back now" button. Without return_url: unchanged text.RETURN_ORIGINSvar →return_originsin consent settings, omitted when empty;pushConsentre-sends when public_url or origins change (stamp stays the bare URL when there are no origins, so existing keyrings are not re-pushed).Tests:
TestReturnURLAfterConnecting,TestValidateConsentadditions. Mutants (all red): ReturnAllowed→true; done() not setting Return; dropping the;check.Rollout: keyring first; Phobos sends return_url only after this is live (an old keyring rejects the unknown field).