Repository navigation
Production setup needs a fixed siteUrl, which then pins passkeys and sitemaps to one host #3705
PavloGrubyi
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
Does the 'Change Domain' feature introduced in 1.20 solve this for you? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We host EmDash sites on Cloudflare Workers. Each site starts on a service subdomain, and the owner can later connect their own domain.
Since the trusted-setup-origin change (1.0.x), production setup fails with
SITE_URL_REQUIREDunlesssiteUrlorEMDASH_SITE_URLis set. We understand the reason: the first unauthenticated setup request must not choose the origin used in auth emails.The side effect is that the same value then drives passkey rpId, sitemaps, robots.txt and canonical URLs at runtime. A site that moves to a new domain must redeploy with a new value, and until then passkey registration on the new domain fails. A site served on two hosts can hold passkeys on only one of them.
Our workaround: set
EMDASH_SITE_URLonly for the setup request, then remove it and redeploy. Setup has already storedemdash:site_urlfor emails, and every other path uses the request origin.siteUrl, for example from a setup-only variable or a setup token, so the runtime can follow the request host?All reactions