fix(common): restore magic-link sign-in flow on cloud for orgs (#6237)
This commit is contained in:
parent
bb1c9a9fe9
commit
df97d11753
1 changed files with 7 additions and 6 deletions
|
|
@ -33,12 +33,13 @@ export default defineComponent({
|
||||||
async mounted() {
|
async mounted() {
|
||||||
const { redirect, ...queryParams } = this.route.query
|
const { redirect, ...queryParams } = this.route.query
|
||||||
|
|
||||||
// Org subdomain magic-link flow: redirect back to the originating subdomain
|
// Firebase delivers magic links to the default cloud instance
|
||||||
if (
|
// (e.g. hoppscotch.io) `/enter` route because `continueUrl` must
|
||||||
platform.organization &&
|
// point there for trust-domain verification. Org-subdomain
|
||||||
!platform.organization.isDefaultCloudInstance &&
|
// (e.g. subdomain.hoppscotch.io) logins redirect back to the
|
||||||
typeof redirect === "string"
|
// originating subdomain; `getSafeRedirectUrl()` restricts the
|
||||||
) {
|
// target to the default cloud instance domain and its subdomains.
|
||||||
|
if (platform.organization && typeof redirect === "string") {
|
||||||
const redirectTarget = getSafeRedirectUrl(
|
const redirectTarget = getSafeRedirectUrl(
|
||||||
redirect,
|
redirect,
|
||||||
platform.organization.getRootDomain()
|
platform.organization.getRootDomain()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue