From df97d11753871142ffddd3de2aa6742c3c9e9b23 Mon Sep 17 00:00:00 2001 From: James George <25279263+jamesgeorge007@users.noreply.github.com> Date: Tue, 28 Apr 2026 14:02:50 +0530 Subject: [PATCH] fix(common): restore magic-link sign-in flow on cloud for orgs (#6237) --- packages/hoppscotch-common/src/pages/enter.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/hoppscotch-common/src/pages/enter.vue b/packages/hoppscotch-common/src/pages/enter.vue index 489d39b1..9d476951 100644 --- a/packages/hoppscotch-common/src/pages/enter.vue +++ b/packages/hoppscotch-common/src/pages/enter.vue @@ -33,12 +33,13 @@ export default defineComponent({ async mounted() { const { redirect, ...queryParams } = this.route.query - // Org subdomain magic-link flow: redirect back to the originating subdomain - if ( - platform.organization && - !platform.organization.isDefaultCloudInstance && - typeof redirect === "string" - ) { + // Firebase delivers magic links to the default cloud instance + // (e.g. hoppscotch.io) `/enter` route because `continueUrl` must + // point there for trust-domain verification. Org-subdomain + // (e.g. subdomain.hoppscotch.io) logins redirect back to the + // originating subdomain; `getSafeRedirectUrl()` restricts the + // target to the default cloud instance domain and its subdomains. + if (platform.organization && typeof redirect === "string") { const redirectTarget = getSafeRedirectUrl( redirect, platform.organization.getRootDomain()