Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion account-gui/src/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
const changeLanguage = lang => () => {
const urlSearchParams = new URLSearchParams(window.location.search);
urlSearchParams.set("lang", lang);
const domain = $conf.domain;
const domain = $conf.baseDomain;
Cookies.set("lang", lang, {
expires: 365,
secure: window.location.protocol.startsWith("https"),
Expand Down
4 changes: 2 additions & 2 deletions account-gui/src/routes/ExternalAccountLinkedError.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
<p class="last">{@html DOMPurify.sanitize(errorDescription)}</p>
{/if}

<Button label={I18n.t("Expired.Back.COPY")} href={`https://${$conf.domain}`}
onClick={() => window.location.href = `https://${$conf.domain}`}/>
<Button label={I18n.t("Expired.Back.COPY")} href={`https://${$conf.baseDomain}`}
onClick={() => window.location.href = `https://${$conf.baseDomain}`}/>
4 changes: 2 additions & 2 deletions account-gui/src/routes/LinkExpired.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
</style>
<h1>{I18n.t("Expired.CodeTitle.COPY")}</h1>
<p>{@html I18n.t("Expired.CodeInfo.COPY")}</p>
<Button label={I18n.t("Expired.Back.COPY")} href={`https://${$conf.domain}`}
onClick={() => window.location.href = `https://${$conf.domain}`}/>
<Button label={I18n.t("Expired.Back.COPY")} href={`https://${$conf.baseDomain}`}
onClick={() => window.location.href = `https://${$conf.baseDomain}`}/>
4 changes: 2 additions & 2 deletions account-gui/src/routes/MaxAttempts.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div class="card">
<h1>{I18n.t("MaxAttempt.Title.COPY")}</h1>
<p>{@html I18n.t("MaxAttempt.Info.COPY")}</p>
<Button label={I18n.t("Expired.Back.COPY")} href={`https://${$conf.domain}`}
onClick={() => window.location.href = `https://${$conf.domain}`}/>
<Button label={I18n.t("Expired.Back.COPY")} href={`https://${$conf.baseDomain}`}
onClick={() => window.location.href = `https://${$conf.baseDomain}`}/>
</div>
</div>
2 changes: 1 addition & 1 deletion account-gui/src/routes/WebAuthn.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
})
.catch(() => {
//happens when the key is already registered
window.location.href = $conf.myconextWebAuthnRedirectSpUrl;
window.location.href = $conf.myconextWebAuthnRedirectUrl;
})
})
.catch(() => navigate("/404"));
Expand Down
8 changes: 4 additions & 4 deletions account-gui/src/stores/conf.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {writable} from 'svelte/store';

export const conf = writable({
basePath: "",
myconextBasePath: "",
magicLinkUrl: "",
continueAfterLoginUrl: "",
domain: "",
myconextWebAuthnRedirectSpUrl: "",
baseDomain: "",
myconextWebAuthnRedirectUrl: "",
featureWebAuthn: false,
featureAllowList: false,
idpBaseUrl: "",
accountBaseUrl: "",
featureWarningEducationalEmailDomain: false,
featureIdVerify: false,
featureServiceDeskActive: false,
Expand Down
2 changes: 1 addition & 1 deletion account-gui/src/verify/ServiceDesk.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
export let id;

const proceed = () => {
window.location.href = `${$conf.idpBaseUrl}/servicedesk/${id}`;
window.location.href = `${$conf.accountBaseUrl}/servicedesk/${id}`;
}

</script>
Expand Down
2 changes: 1 addition & 1 deletion myconext-gui/src/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const changeLanguage = lang => () => {
const urlSearchParams = new URLSearchParams(window.location.search);
urlSearchParams.set("lang", lang);
Cookies.set("lang", lang, {expires: 365, secure: true, sameSite: "Lax", domain: $config.domain});
Cookies.set("lang", lang, {expires: 365, secure: true, sameSite: "Lax", domain: $config.baseDomain});
window.location.search = urlSearchParams.toString();
updateLanguage(lang).then(() => {
flash.setValue("Footer.LanguageChanged.COPY");
Expand Down
2 changes: 1 addition & 1 deletion myconext-gui/src/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
familyName: "",
usePassword: false
};
window.location.href = `${$config.idpBaseUrl}/doLogout?param=${encodeURIComponent("logout=true")}`;
window.location.href = `${$config.accountBaseUrl}/doLogout?param=${encodeURIComponent("logout=true")}`;
});
}

Expand Down
2 changes: 1 addition & 1 deletion myconext-gui/src/routes/CreateFromInstitution.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
onClick={startFlow}/>
</div>
<div class="footer">
<span>{@html I18n.t("createFromInstitution.alreadyHaveAnEduID", {location: $config.spBaseUrl})}</span>
<span>{@html I18n.t("createFromInstitution.alreadyHaveAnEduID", {location: $config.myconextBaseUrl})}</span>
</div>
</div>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion myconext-gui/src/routes/DeleteAccount.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
familyName: "",
usePassword: false
};
window.location.href = `${$config.idpBaseUrl}/doLogout?param=${encodeURIComponent("delete=true")}`;
window.location.href = `${$config.accountBaseUrl}/doLogout?param=${encodeURIComponent("delete=true")}`;
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions myconext-gui/src/routes/EditEmail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
})
.catch(e => {
if (e.status === 403 || e.status === 400) {
doLogOutAfterRateLimit($config.idpBaseUrl);
doLogOutAfterRateLimit($config.accountBaseUrl);
} else {
wrongCode = true;
}
Expand All @@ -68,7 +68,7 @@
allowedToResend = false;
setTimeout(() => allowedToResend = true, resendMailAllowedTimeOut);
}).catch(() => {
doLogOutAfterRateLimit($config.idpBaseUrl);
doLogOutAfterRateLimit($config.accountBaseUrl);
})
}

Expand Down
2 changes: 1 addition & 1 deletion myconext-gui/src/routes/Password.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
return setLoginPreference("usePassword");
})
.then(res => {
window.location.href = `${$config.idpBaseUrl}/register/login-preference/${res.token}`;
window.location.href = `${$config.accountBaseUrl}/register/login-preference/${res.token}`;
})
.catch(() => {
passwordResetHashExpired = true;
Expand Down
4 changes: 2 additions & 2 deletions myconext-gui/src/routes/PasswordLink.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
})
.catch(e => {
if (e.status === 403 || e.status === 400) {
doLogOutAfterRateLimit($config.idpBaseUrl);
doLogOutAfterRateLimit($config.accountBaseUrl);
} else {
wrongCode = true;
}
Expand All @@ -72,7 +72,7 @@
allowedToResend = false;
setTimeout(() => allowedToResend = true, resendMailAllowedTimeOut);
}).catch(() => {
doLogOutAfterRateLimit($config.idpBaseUrl);
doLogOutAfterRateLimit($config.accountBaseUrl);
})
}

Expand Down
4 changes: 2 additions & 2 deletions myconext-gui/src/routes/PersonalInfo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
})
.catch(e => {
if (e.status === 403 || e.status === 400) {
doLogOutAfterRateLimit($config.idpBaseUrl);
doLogOutAfterRateLimit($config.accountBaseUrl);
} else {
wrongCode = true;
}
Expand Down Expand Up @@ -221,7 +221,7 @@
tempEmailValue = value;
outstandingPasswordForgotten = true;
} else {
doLogOutAfterRateLimit($config.idpBaseUrl);
doLogOutAfterRateLimit($config.accountBaseUrl);
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion myconext-gui/src/routes/WebAuthn.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
const startWebAuthn = () => {
loading = true;
startWebAuthFlow().then(res => {
window.location.href = `${$config.myconextWebAuthUrl}?token=${res.token}&name=${encodeURIComponent(credentialName)}`
window.location.href = `${$config.accountWebAuthUrl}?token=${res.token}&name=${encodeURIComponent(credentialName)}`
});
}

Expand Down
2 changes: 1 addition & 1 deletion myconext-gui/src/routes/tiqr/Congrats.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
loading = true;
finishEnrollment().then(res => {
//need to set secure cookie in login domain
window.location.href = `${$config.idpBaseUrl}/register/${res.enrollmentVerificationKey}`;
window.location.href = `${$config.accountBaseUrl}/register/${res.enrollmentVerificationKey}`;
})
}

Expand Down
7 changes: 3 additions & 4 deletions myconext-gui/src/stores/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ export const config = writable({
loginUrl: "",
baseDomain: "",
myConextUrlGuestIdp: "",
spBaseUrl: "",
myconextBaseUrl: "",
createEduIDInstitutionLanding: false,
myconextWebAuthUrl: "",
accountWebAuthUrl: "",
magicLinkUrl: "",
domain: "",
idpBaseUrl: "",
accountBaseUrl: "",
featureWebAuthn: false,
featureOidcTokenAPI: false,
featureConnections: false,
Expand Down
4 changes: 2 additions & 2 deletions myconext-gui/src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export const stopEvent = e => {
return true;
}

export const doLogOutAfterRateLimit = idpBaseUrl => {
export const doLogOutAfterRateLimit = accountBaseUrl => {
logout().then(() => {
window.location.href = `${idpBaseUrl}/doLogout?param=${encodeURIComponent("ratelimit=true")}`;
window.location.href = `${accountBaseUrl}/doLogout?param=${encodeURIComponent("ratelimit=true")}`;
});
}

Expand Down
Loading
Loading