update redirect urls

This commit is contained in:
creeper123123321 2021-07-09 14:52:13 -03:00 committed by GitHub
parent 6bfbaf316a
commit 061699242f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,15 @@
// https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-javascript-auth-code // https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-javascript-auth-code
const redirectUrl = location.origin == "https://localhost:25543" ? const azureClientId = "a370fff9-7648-4dbf-b96e-2b4f8d539ac2";
"https://localhost:25543/" : "https://viaversion.github.io/VIAaaS/src/main/resources/web/"; const whitelistedOrigin = ["https://localhost:25543", "https://via-login.geyserconnect.net", "https://via.re.yt.nom.br", "https://viaaas.noxt.cf"];
let redirectUrl = "https://viaversion.github.io/VIAaaS/src/main/resources/web/";
if (whitelistedOrigin.includes(location.origin)) {
redirectUrl = location.origin + location.pathname;
}
const msalConfig = { const msalConfig = {
auth: { auth: {
clientId: "a370fff9-7648-4dbf-b96e-2b4f8d539ac2", clientId: azureClientId,
authority: "https://login.microsoftonline.com/consumers/", authority: "https://login.microsoftonline.com/consumers/",
redirectUri: redirectUrl, redirectUri: redirectUrl,
}, },