@tapni/auth 0.0.167 → 0.0.168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +6 -6
- package/dist/{Account-LbwXU_zF.js → Account-uZVmDKkt.js} +1 -1
- package/dist/{QR-8LYoP9ge.js → QR-UQySwgoT.js} +1 -1
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +2 -2
- package/dist/{install-bvo7alyE.js → install-KFv1Z6O7.js} +147 -144
- package/package.json +1 -1
- package/src/store/auth.js +3 -1
|
@@ -1175,7 +1175,7 @@ uo.write = function(n, e, t, r, o, i) {
|
|
|
1175
1175
|
throw new Error("BigInt not supported");
|
|
1176
1176
|
}
|
|
1177
1177
|
})(lo);
|
|
1178
|
-
const wn = lo.Buffer, aa = lo.Buffer, pr = Qr(/* @__PURE__ */ new Map()),
|
|
1178
|
+
const wn = lo.Buffer, aa = lo.Buffer, pr = Qr(/* @__PURE__ */ new Map()), F = {
|
|
1179
1179
|
$on(n, e) {
|
|
1180
1180
|
let t = pr.get(n);
|
|
1181
1181
|
t || (t = /* @__PURE__ */ new Set(), pr.set(n, t)), t.add(e);
|
|
@@ -1191,7 +1191,7 @@ const wn = lo.Buffer, aa = lo.Buffer, pr = Qr(/* @__PURE__ */ new Map()), q = {
|
|
|
1191
1191
|
t && t.delete(e);
|
|
1192
1192
|
}
|
|
1193
1193
|
};
|
|
1194
|
-
zi(
|
|
1194
|
+
zi(F);
|
|
1195
1195
|
const sa = {
|
|
1196
1196
|
computed: {
|
|
1197
1197
|
home() {
|
|
@@ -1351,7 +1351,7 @@ const sa = {
|
|
|
1351
1351
|
console.log("Play was interrupted:", e);
|
|
1352
1352
|
}
|
|
1353
1353
|
}), setTimeout(() => {
|
|
1354
|
-
this.$storex && this.$storex.token ? this.$router.push(this.home) :
|
|
1354
|
+
this.$storex && this.$storex.token ? this.$router.push(this.home) : F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
1355
1355
|
}, 500);
|
|
1356
1356
|
},
|
|
1357
1357
|
methods: {}
|
|
@@ -1411,7 +1411,7 @@ function Ca(n, e, t, r, o, i) {
|
|
|
1411
1411
|
const po = /* @__PURE__ */ mt(da, [["render", Ca], ["__scopeId", "data-v-615ed484"]]), Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1412
1412
|
__proto__: null,
|
|
1413
1413
|
default: po
|
|
1414
|
-
}, Symbol.toStringTag, { value: "Module" })), Ta = "0.0.
|
|
1414
|
+
}, Symbol.toStringTag, { value: "Module" })), Ta = "0.0.168", hr = {
|
|
1415
1415
|
getMe() {
|
|
1416
1416
|
return ce().get("/users/me");
|
|
1417
1417
|
},
|
|
@@ -5552,7 +5552,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5552
5552
|
choose_other_login_methods: "다른 로그인 방법 선택하기",
|
|
5553
5553
|
no_sso_logins: "귀하의 회사는 SSO 로그인을 사용하지 않습니다. 관리자에게 문의하십시오."
|
|
5554
5554
|
}
|
|
5555
|
-
}, Ao = () => Promise.resolve().then(() => Ea), Ia = () => Promise.resolve().then(() => qc), Aa = () => Promise.resolve().then(() => Ul), Ra = () => Promise.resolve().then(() => wd), Pa = () => import("./Account-
|
|
5555
|
+
}, Ao = () => Promise.resolve().then(() => Ea), Ia = () => Promise.resolve().then(() => qc), Aa = () => Promise.resolve().then(() => Ul), Ra = () => Promise.resolve().then(() => wd), Pa = () => import("./Account-uZVmDKkt.js"), Ma = () => Promise.resolve().then(() => du), Na = () => Promise.resolve().then(() => Id), Oa = () => import("./QR-UQySwgoT.js"), La = () => Promise.resolve().then(() => xu), za = [
|
|
5556
5556
|
{
|
|
5557
5557
|
path: "/welcome",
|
|
5558
5558
|
name: "AuthWelcome",
|
|
@@ -5732,7 +5732,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5732
5732
|
if (e.response.data.error === "ACCESS_DENIED")
|
|
5733
5733
|
return n("logout");
|
|
5734
5734
|
if (e.response.data.error === "OTP_REQUIRED")
|
|
5735
|
-
return
|
|
5735
|
+
return F.$emit("toggleOTPModal", !0);
|
|
5736
5736
|
!e.response.data.error.includes("Network Error") && !e.response.data.error.includes("TOKEN_EXPIRED") && !e.response.data.error.includes("Cannot read properties") && n("errorSnack", e.response.data.error);
|
|
5737
5737
|
}
|
|
5738
5738
|
return e;
|
|
@@ -5789,7 +5789,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5789
5789
|
username: r,
|
|
5790
5790
|
UserId: t.loggedInAccounts[r].id,
|
|
5791
5791
|
localUser: t.loggedInAccounts[r]
|
|
5792
|
-
}), n("setLoggedInUserId", t.loggedInAccounts[r].id), n("setRefreshToken", t.loggedInAccounts[r].refreshToken), await e("refreshTokenAction", t.loggedInAccounts[r])),
|
|
5792
|
+
}), n("setLoggedInUserId", t.loggedInAccounts[r].id), n("setRefreshToken", t.loggedInAccounts[r].refreshToken), await e("refreshTokenAction", t.loggedInAccounts[r])), F.$emit("ssoEvent", { name: "switchAccount", data: { username: r } });
|
|
5793
5793
|
},
|
|
5794
5794
|
async refreshTokenAction({ dispatch: n, commit: e, state: t, getters: r }, o) {
|
|
5795
5795
|
if (t.refreshing)
|
|
@@ -5804,7 +5804,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5804
5804
|
);
|
|
5805
5805
|
if (i && i.response && i.response.data.error === "ACCESS_DENIED")
|
|
5806
5806
|
return n("logout", { refreshToken: o.refreshToken, sendRequest: !1 }), location.reload();
|
|
5807
|
-
a && a.data && (e("setToken", a.data.token),
|
|
5807
|
+
a && a.data && (e("setToken", a.data.token), F.$emit("ssoEvent", { name: "setStorage", data: t.$storex })), t.refreshing = !1;
|
|
5808
5808
|
},
|
|
5809
5809
|
async login({ commit: n, state: e, dispatch: t }, r) {
|
|
5810
5810
|
const [o, i] = await fe($e.login(r));
|
|
@@ -5824,7 +5824,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5824
5824
|
{ code: o.data.auth_code, state: e.state },
|
|
5825
5825
|
i
|
|
5826
5826
|
);
|
|
5827
|
-
}) : e.display === "npm" && (
|
|
5827
|
+
}) : e.display === "npm" && (F.$emit("ssoEvent", { name: "setLoading", data: !0 }), F.$emit("ssoEvent", { name: "setStorage", data: e.$storex }), F.$emit("ssoEvent", { name: "getUser", data: { username: o.data.data.username } }), t("setLoggedInAccounts", [
|
|
5828
5828
|
{
|
|
5829
5829
|
id: o.data.data.id,
|
|
5830
5830
|
username: o.data.data.username,
|
|
@@ -5834,7 +5834,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5834
5834
|
}
|
|
5835
5835
|
]), o.isModal && (t("successSnack", e.ssoLang[r.appLanguage].success_login), setTimeout(() => {
|
|
5836
5836
|
location.reload();
|
|
5837
|
-
}, 1500)),
|
|
5837
|
+
}, 1500)), F.$emit("ssoEvent", { name: "redirect", data: "/" + o.data.data.username + "#edit" }));
|
|
5838
5838
|
},
|
|
5839
5839
|
async register({ commit: n, dispatch: e }, t) {
|
|
5840
5840
|
const [r, o] = await fe(
|
|
@@ -5919,11 +5919,14 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5919
5919
|
UserId: t.loggedInAccounts[a].id,
|
|
5920
5920
|
localUser: t.loggedInAccounts[a]
|
|
5921
5921
|
}), n("setRefreshToken", i[0]), n("setLoggedInUserId", t.loggedInAccounts[a].id), e("refreshTokenAction", t.loggedInAccounts[a]).then(() => {
|
|
5922
|
-
|
|
5922
|
+
F.$emit("ssoEvent", { name: "switchAccount", data: { username: a } });
|
|
5923
5923
|
}));
|
|
5924
5924
|
});
|
|
5925
|
-
else
|
|
5926
|
-
|
|
5925
|
+
else {
|
|
5926
|
+
if (t.display === "redirect")
|
|
5927
|
+
return Ro.push("/welcome");
|
|
5928
|
+
t.display === "npm" && F.$emit("ssoEvent", { name: "redirect", data: "/welcome" });
|
|
5929
|
+
}
|
|
5927
5930
|
},
|
|
5928
5931
|
async getCompanyBySSOEmail({ commit: n, dispatch: e }, t) {
|
|
5929
5932
|
const [r, o] = await fe(
|
|
@@ -5951,7 +5954,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5951
5954
|
return r ? e("errorHandler", r) : o.data.success;
|
|
5952
5955
|
},
|
|
5953
5956
|
setLoggedInAccounts({ commit: n }, e) {
|
|
5954
|
-
n("setLoggedInAccounts", e),
|
|
5957
|
+
n("setLoggedInAccounts", e), F.$emit("ssoEvent", { name: "setLoggedInAccounts", data: e });
|
|
5955
5958
|
},
|
|
5956
5959
|
setLoggedInUserId({ commit: n }, e) {
|
|
5957
5960
|
n("setLoggedInUserId", e);
|
|
@@ -6128,7 +6131,7 @@ const $e = {
|
|
|
6128
6131
|
this.referral && (e.ref = this.referral), this.display === "popup" && (e.response_type = "code");
|
|
6129
6132
|
const [r, o] = await fe($e.googleSDK(e, this.$storex));
|
|
6130
6133
|
if (r)
|
|
6131
|
-
return this.googleLoad = !1,
|
|
6134
|
+
return this.googleLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 }), this.errorHandler(r);
|
|
6132
6135
|
if (o.data.success) {
|
|
6133
6136
|
if (this.display === "popup")
|
|
6134
6137
|
return (t = window.parent) == null ? void 0 : t.postMessage({ code: o.data.auth_code, state: this.$route.query.state }, "*");
|
|
@@ -6138,7 +6141,7 @@ const $e = {
|
|
|
6138
6141
|
} else
|
|
6139
6142
|
this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err);
|
|
6140
6143
|
} else
|
|
6141
|
-
this.googleLoad = !1,
|
|
6144
|
+
this.googleLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
6142
6145
|
}
|
|
6143
6146
|
}
|
|
6144
6147
|
}, xa = ar("FacebookLogin", {
|
|
@@ -6183,17 +6186,17 @@ const hi = {
|
|
|
6183
6186
|
if (this.referral && (t.ref = this.referral), this.display === "popup" && (t.response_type = "code"), t && t.accessToken) {
|
|
6184
6187
|
const [o, i] = await fe($e.facebookSDK(t, this.$storex));
|
|
6185
6188
|
if (o)
|
|
6186
|
-
return this.facebookLoad = !1,
|
|
6189
|
+
return this.facebookLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 }), this.errorHandler(o);
|
|
6187
6190
|
if (i.data.success) {
|
|
6188
6191
|
if (this.display === "popup")
|
|
6189
6192
|
return (r = window.parent) == null ? void 0 : r.postMessage({ code: i.data.auth_code, state: this.$route.query.state }, "*");
|
|
6190
6193
|
await this.loginSetup(i), await this.getLoggedInAccounts(), this.$router.push("/" + i.data.data.username + "#edit"), setTimeout(() => {
|
|
6191
|
-
this.facebookLoad = !1,
|
|
6194
|
+
this.facebookLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
6192
6195
|
}, 1e3);
|
|
6193
6196
|
} else
|
|
6194
6197
|
this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err);
|
|
6195
6198
|
} else
|
|
6196
|
-
this.facebookLoad = !1,
|
|
6199
|
+
this.facebookLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
6197
6200
|
}
|
|
6198
6201
|
}
|
|
6199
6202
|
}, Ua = ar("SignInWithApple", {
|
|
@@ -6224,7 +6227,7 @@ const hi = {
|
|
|
6224
6227
|
this.referral && (e.response.ref = this.referral), this.display === "popup" && (e.response_type = "code");
|
|
6225
6228
|
const [r, o] = await fe($e.appleSDK(e.response, this.$storex));
|
|
6226
6229
|
if (r)
|
|
6227
|
-
return this.appleLoad = !1,
|
|
6230
|
+
return this.appleLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 }), this.errorHandler(r);
|
|
6228
6231
|
if (o.data.success) {
|
|
6229
6232
|
if (this.display === "popup")
|
|
6230
6233
|
return (t = window.parent) == null ? void 0 : t.postMessage({ code: o.data.auth_code, state: this.$route.query.state }, "*");
|
|
@@ -6234,7 +6237,7 @@ const hi = {
|
|
|
6234
6237
|
} else
|
|
6235
6238
|
this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err);
|
|
6236
6239
|
} else
|
|
6237
|
-
this.appleLoad = !1,
|
|
6240
|
+
this.appleLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
6238
6241
|
}
|
|
6239
6242
|
}
|
|
6240
6243
|
};
|
|
@@ -10539,7 +10542,7 @@ var U = {
|
|
|
10539
10542
|
code: "native_prompt_not_supported",
|
|
10540
10543
|
desc: "The provided prompt is not supported by the native platform. This request should be routed to the web based flow."
|
|
10541
10544
|
}
|
|
10542
|
-
},
|
|
10545
|
+
}, q = (
|
|
10543
10546
|
/** @class */
|
|
10544
10547
|
function(n) {
|
|
10545
10548
|
Ve(e, n);
|
|
@@ -11341,14 +11344,14 @@ var ao = (
|
|
|
11341
11344
|
this.logger.trace("BrowserCacheManager.getCachedRequest called");
|
|
11342
11345
|
var o = this.getTemporaryCache(ue.REQUEST_PARAMS, !0);
|
|
11343
11346
|
if (!o)
|
|
11344
|
-
throw
|
|
11347
|
+
throw q.createNoTokenRequestCacheError();
|
|
11345
11348
|
var i = this.validateAndParseJson(r.base64Decode(o));
|
|
11346
11349
|
if (!i)
|
|
11347
|
-
throw
|
|
11350
|
+
throw q.createUnableToParseTokenRequestCacheError();
|
|
11348
11351
|
if (this.removeItem(this.generateCacheKey(ue.REQUEST_PARAMS)), V.isEmpty(i.authority)) {
|
|
11349
11352
|
var a = this.generateAuthorityKey(t), s = this.getTemporaryCache(a);
|
|
11350
11353
|
if (!s)
|
|
11351
|
-
throw
|
|
11354
|
+
throw q.createNoCachedAuthorityError();
|
|
11352
11355
|
i.authority = s;
|
|
11353
11356
|
}
|
|
11354
11357
|
return i;
|
|
@@ -11369,7 +11372,7 @@ var ao = (
|
|
|
11369
11372
|
var r = w.CACHE_PREFIX + "." + ue.INTERACTION_STATUS_KEY;
|
|
11370
11373
|
if (t) {
|
|
11371
11374
|
if (this.getInteractionInProgress())
|
|
11372
|
-
throw
|
|
11375
|
+
throw q.createInteractionInProgressError();
|
|
11373
11376
|
this.setTemporaryCache(r, this.clientId, !1);
|
|
11374
11377
|
} else
|
|
11375
11378
|
!t && this.getInteractionInProgress() === this.clientId && this.removeItem(r);
|
|
@@ -11435,7 +11438,7 @@ var hs = (
|
|
|
11435
11438
|
case 1:
|
|
11436
11439
|
return r = a.sent(), [3, 3];
|
|
11437
11440
|
case 2:
|
|
11438
|
-
throw o = a.sent(), window.navigator.onLine ?
|
|
11441
|
+
throw o = a.sent(), window.navigator.onLine ? q.createGetRequestFailedError(o, e) : q.createNoNetworkConnectivityError();
|
|
11439
11442
|
case 3:
|
|
11440
11443
|
return a.trys.push([3, 5, , 6]), i = {
|
|
11441
11444
|
headers: this.getHeaderDict(r.headers)
|
|
@@ -11443,7 +11446,7 @@ var hs = (
|
|
|
11443
11446
|
case 4:
|
|
11444
11447
|
return [2, (i.body = a.sent(), i.status = r.status, i)];
|
|
11445
11448
|
case 5:
|
|
11446
|
-
throw a.sent(),
|
|
11449
|
+
throw a.sent(), q.createFailedToParseNetworkResponseError(e);
|
|
11447
11450
|
case 6:
|
|
11448
11451
|
return [
|
|
11449
11452
|
2
|
|
@@ -11468,7 +11471,7 @@ var hs = (
|
|
|
11468
11471
|
case 2:
|
|
11469
11472
|
return o = s.sent(), [3, 4];
|
|
11470
11473
|
case 3:
|
|
11471
|
-
throw i = s.sent(), window.navigator.onLine ?
|
|
11474
|
+
throw i = s.sent(), window.navigator.onLine ? q.createPostRequestFailedError(i, e) : q.createNoNetworkConnectivityError();
|
|
11472
11475
|
case 4:
|
|
11473
11476
|
return s.trys.push([4, 6, , 7]), a = {
|
|
11474
11477
|
headers: this.getHeaderDict(o.headers)
|
|
@@ -11476,7 +11479,7 @@ var hs = (
|
|
|
11476
11479
|
case 5:
|
|
11477
11480
|
return [2, (a.body = s.sent(), a.status = o.status, a)];
|
|
11478
11481
|
case 6:
|
|
11479
|
-
throw s.sent(),
|
|
11482
|
+
throw s.sent(), q.createFailedToParseNetworkResponseError(e);
|
|
11480
11483
|
case 7:
|
|
11481
11484
|
return [
|
|
11482
11485
|
2
|
|
@@ -11529,7 +11532,7 @@ var fs = (
|
|
|
11529
11532
|
/* async: */
|
|
11530
11533
|
!0
|
|
11531
11534
|
), o.setXhrHeaders(s, r), s.onload = function() {
|
|
11532
|
-
(s.status < 200 || s.status >= 300) && (t === Ft.POST ? a(
|
|
11535
|
+
(s.status < 200 || s.status >= 300) && (t === Ft.POST ? a(q.createPostRequestFailedError("Failed with status " + s.status, e)) : a(q.createGetRequestFailedError("Failed with status " + s.status, e)));
|
|
11533
11536
|
try {
|
|
11534
11537
|
var u = JSON.parse(s.responseText), p = {
|
|
11535
11538
|
headers: o.getHeaderDict(s),
|
|
@@ -11538,16 +11541,16 @@ var fs = (
|
|
|
11538
11541
|
};
|
|
11539
11542
|
i(p);
|
|
11540
11543
|
} catch {
|
|
11541
|
-
a(
|
|
11544
|
+
a(q.createFailedToParseNetworkResponseError(e));
|
|
11542
11545
|
}
|
|
11543
11546
|
}, s.onerror = function() {
|
|
11544
|
-
window.navigator.onLine ? t === Ft.POST ? a(
|
|
11547
|
+
window.navigator.onLine ? t === Ft.POST ? a(q.createPostRequestFailedError("Failed with status " + s.status, e)) : a(q.createGetRequestFailedError("Failed with status " + s.status, e)) : a(q.createNoNetworkConnectivityError());
|
|
11545
11548
|
}, t === Ft.POST && r && r.body)
|
|
11546
11549
|
s.send(r.body);
|
|
11547
11550
|
else if (t === Ft.GET)
|
|
11548
11551
|
s.send();
|
|
11549
11552
|
else
|
|
11550
|
-
throw
|
|
11553
|
+
throw q.createHttpMethodNotImplementedError(t);
|
|
11551
11554
|
});
|
|
11552
11555
|
}, n.prototype.setXhrHeaders = function(e, t) {
|
|
11553
11556
|
if (t && t.headers) {
|
|
@@ -11590,20 +11593,20 @@ var Ae = (
|
|
|
11590
11593
|
}, n.blockReloadInHiddenIframes = function() {
|
|
11591
11594
|
var e = le.hashContainsKnownProperties(window.location.hash);
|
|
11592
11595
|
if (e && n.isInIframe())
|
|
11593
|
-
throw
|
|
11596
|
+
throw q.createBlockReloadInHiddenIframeError();
|
|
11594
11597
|
}, n.blockRedirectInIframe = function(e, t) {
|
|
11595
11598
|
var r = n.isInIframe();
|
|
11596
11599
|
if (e === W.Redirect && r && !t)
|
|
11597
|
-
throw
|
|
11600
|
+
throw q.createRedirectInIframeError(r);
|
|
11598
11601
|
}, n.blockAcquireTokenInPopups = function() {
|
|
11599
11602
|
if (n.isInPopup())
|
|
11600
|
-
throw
|
|
11603
|
+
throw q.createBlockAcquireTokenInPopupsError();
|
|
11601
11604
|
}, n.blockNonBrowserEnvironment = function(e) {
|
|
11602
11605
|
if (!e)
|
|
11603
|
-
throw
|
|
11606
|
+
throw q.createNonBrowserEnvironmentError();
|
|
11604
11607
|
}, n.blockNativeBrokerCalledBeforeInitialized = function(e, t) {
|
|
11605
11608
|
if (e && !t)
|
|
11606
|
-
throw
|
|
11609
|
+
throw q.createNativeBrokerCalledBeforeInitialize();
|
|
11607
11610
|
}, n.detectIEOrEdge = function() {
|
|
11608
11611
|
var e = window.navigator.userAgent, t = e.indexOf("MSIE "), r = e.indexOf("Trident/"), o = e.indexOf("Edge/"), i = t > 0 || r > 0, a = o > 0;
|
|
11609
11612
|
return i || a;
|
|
@@ -11837,12 +11840,12 @@ var Gn = (
|
|
|
11837
11840
|
});
|
|
11838
11841
|
}, e.prototype.validateAndExtractStateFromHash = function(t, r, o) {
|
|
11839
11842
|
if (this.logger.verbose("validateAndExtractStateFromHash called", o), !t.state)
|
|
11840
|
-
throw
|
|
11843
|
+
throw q.createHashDoesNotContainStateError();
|
|
11841
11844
|
var i = bi.extractBrowserRequestState(this.browserCrypto, t.state);
|
|
11842
11845
|
if (!i)
|
|
11843
|
-
throw
|
|
11846
|
+
throw q.createUnableToParseStateError();
|
|
11844
11847
|
if (i.interactionType !== r)
|
|
11845
|
-
throw
|
|
11848
|
+
throw q.createStateInteractionTypeMismatchError();
|
|
11846
11849
|
return this.logger.verbose("Returning state from hash", o), t.state;
|
|
11847
11850
|
}, e.prototype.getDiscoveredAuthority = function(t, r) {
|
|
11848
11851
|
var o;
|
|
@@ -11902,13 +11905,13 @@ var yo = (
|
|
|
11902
11905
|
var i, a, s;
|
|
11903
11906
|
return L(this, function(u) {
|
|
11904
11907
|
if (this.performanceClient.addQueueMeasurement(A.HandleCodeResponseFromHash, this.authCodeRequest.correlationId), this.logger.verbose("InteractionHandler.handleCodeResponse called"), V.isEmpty(e))
|
|
11905
|
-
throw
|
|
11908
|
+
throw q.createEmptyHashError(e);
|
|
11906
11909
|
if (i = this.browserStorage.generateStateKey(t), a = this.browserStorage.getTemporaryCache(i), !a)
|
|
11907
11910
|
throw Y.createStateNotFoundError("Cached State");
|
|
11908
11911
|
try {
|
|
11909
11912
|
s = this.authModule.handleFragmentResponse(e, a);
|
|
11910
11913
|
} catch (p) {
|
|
11911
|
-
throw p instanceof In && p.subError === U.userCancelledError.code ?
|
|
11914
|
+
throw p instanceof In && p.subError === U.userCancelledError.code ? q.createUserCancelledError() : p;
|
|
11912
11915
|
}
|
|
11913
11916
|
return this.performanceClient.setPreQueueTime(A.HandleCodeResponseFromServer, this.authCodeRequest.correlationId), [2, this.handleCodeResponseFromServer(s, t, r, o)];
|
|
11914
11917
|
});
|
|
@@ -12000,7 +12003,7 @@ var Go = (
|
|
|
12000
12003
|
case 6:
|
|
12001
12004
|
return [3, 8];
|
|
12002
12005
|
case 7:
|
|
12003
|
-
throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),
|
|
12006
|
+
throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"), q.createEmptyNavigationUriError();
|
|
12004
12007
|
case 8:
|
|
12005
12008
|
return [
|
|
12006
12009
|
2
|
|
@@ -12016,13 +12019,13 @@ var Go = (
|
|
|
12016
12019
|
switch (k.label) {
|
|
12017
12020
|
case 0:
|
|
12018
12021
|
if (this.logger.verbose("RedirectHandler.handleCodeResponse called"), V.isEmpty(t))
|
|
12019
|
-
throw
|
|
12022
|
+
throw q.createEmptyHashError(t);
|
|
12020
12023
|
if (this.browserStorage.setInteractionInProgress(!1), a = this.browserStorage.generateStateKey(r), s = this.browserStorage.getTemporaryCache(a), !s)
|
|
12021
12024
|
throw Y.createStateNotFoundError("Cached State");
|
|
12022
12025
|
try {
|
|
12023
12026
|
u = this.authModule.handleFragmentResponse(t, s);
|
|
12024
12027
|
} catch (E) {
|
|
12025
|
-
throw E instanceof In && E.subError === U.userCancelledError.code ?
|
|
12028
|
+
throw E instanceof In && E.subError === U.userCancelledError.code ? q.createUserCancelledError() : E;
|
|
12026
12029
|
}
|
|
12027
12030
|
return p = this.browserStorage.generateNonceKey(s), l = this.browserStorage.getTemporaryCache(p), this.authCodeRequest.code = u.code, u.cloud_instance_host_name ? [4, this.updateTokenEndpointAuthority(u.cloud_instance_host_name, o, i)] : [3, 2];
|
|
12028
12031
|
case 1:
|
|
@@ -12084,9 +12087,9 @@ var Vn = {
|
|
|
12084
12087
|
case pn.USER_INTERACTION_REQUIRED:
|
|
12085
12088
|
return new Pt(t, r);
|
|
12086
12089
|
case pn.USER_CANCEL:
|
|
12087
|
-
return
|
|
12090
|
+
return q.createUserCancelledError();
|
|
12088
12091
|
case pn.NO_NETWORK:
|
|
12089
|
-
return
|
|
12092
|
+
return q.createNoNetworkConnectivityError();
|
|
12090
12093
|
}
|
|
12091
12094
|
return new e(t, r, o);
|
|
12092
12095
|
}, e.createUserSwitchError = function() {
|
|
@@ -12121,7 +12124,7 @@ var Ci = (
|
|
|
12121
12124
|
fromCache: !0
|
|
12122
12125
|
}), [2, a];
|
|
12123
12126
|
case 4:
|
|
12124
|
-
throw s = u.sent(), s instanceof
|
|
12127
|
+
throw s = u.sent(), s instanceof q && s.errorCode === U.signingKeyNotFoundInStorage.code && this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."), r.endMeasurement({
|
|
12125
12128
|
errorCode: s instanceof X && s.errorCode || void 0,
|
|
12126
12129
|
subErrorCode: s instanceof X && s.subError || void 0,
|
|
12127
12130
|
success: !1
|
|
@@ -12135,7 +12138,7 @@ var Ci = (
|
|
|
12135
12138
|
});
|
|
12136
12139
|
});
|
|
12137
12140
|
}, e.prototype.logout = function() {
|
|
12138
|
-
return Promise.reject(
|
|
12141
|
+
return Promise.reject(q.createSilentLogoutUnsupportedError());
|
|
12139
12142
|
}, e.prototype.createSilentFlowClient = function(t, r, o) {
|
|
12140
12143
|
return O(this, void 0, void 0, function() {
|
|
12141
12144
|
var i;
|
|
@@ -12455,7 +12458,7 @@ var Bn = (
|
|
|
12455
12458
|
case Ze.LOGIN:
|
|
12456
12459
|
return k.logger.trace("initializeNativeRequest: prompt is compatible with native flow"), t.prompt;
|
|
12457
12460
|
default:
|
|
12458
|
-
throw k.logger.trace("initializeNativeRequest: prompt = " + t.prompt + " is not compatible with native flow"),
|
|
12461
|
+
throw k.logger.trace("initializeNativeRequest: prompt = " + t.prompt + " is not compatible with native flow"), q.createNativePromptParameterNotSupportedError();
|
|
12459
12462
|
}
|
|
12460
12463
|
}, p = $($({}, a), {
|
|
12461
12464
|
accountId: this.accountId,
|
|
@@ -12548,7 +12551,7 @@ var Sn = (
|
|
|
12548
12551
|
t.onChannelMessage(o);
|
|
12549
12552
|
}, window.postMessage(e, window.origin, [this.messageChannel.port2]), [2, new Promise(function(o, i) {
|
|
12550
12553
|
t.handshakeResolvers.set(e.responseId, { resolve: o, reject: i }), t.timeoutId = window.setTimeout(function() {
|
|
12551
|
-
window.removeEventListener("message", t.windowListener, !1), t.messageChannel.port1.close(), t.messageChannel.port2.close(), t.handshakeEvent.endMeasurement({ extensionHandshakeTimedOut: !0, success: !1 }), i(
|
|
12554
|
+
window.removeEventListener("message", t.windowListener, !1), t.messageChannel.port1.close(), t.messageChannel.port2.close(), t.handshakeEvent.endMeasurement({ extensionHandshakeTimedOut: !0, success: !1 }), i(q.createNativeHandshakeTimeoutError()), t.handshakeResolvers.delete(e.responseId);
|
|
12552
12555
|
}, t.handshakeTimeoutMs);
|
|
12553
12556
|
})];
|
|
12554
12557
|
});
|
|
@@ -12559,7 +12562,7 @@ var Sn = (
|
|
|
12559
12562
|
if (!(!t.channel || t.channel !== Qn.CHANNEL_ID) && !(t.extensionId && t.extensionId !== this.extensionId) && t.body.method === en.HandshakeRequest) {
|
|
12560
12563
|
this.logger.verbose(t.extensionId ? "Extension with id: " + t.extensionId + " not installed" : "No extension installed"), clearTimeout(this.timeoutId), this.messageChannel.port1.close(), this.messageChannel.port2.close(), window.removeEventListener("message", this.windowListener, !1);
|
|
12561
12564
|
var r = this.handshakeResolvers.get(t.responseId);
|
|
12562
|
-
r && (this.handshakeEvent.endMeasurement({ success: !1, extensionInstalled: !1 }), r.reject(
|
|
12565
|
+
r && (this.handshakeEvent.endMeasurement({ success: !1, extensionInstalled: !1 }), r.reject(q.createNativeExtensionNotInstalledError()));
|
|
12563
12566
|
}
|
|
12564
12567
|
}
|
|
12565
12568
|
}, n.prototype.onChannelMessage = function(e) {
|
|
@@ -12718,7 +12721,7 @@ var gs = (
|
|
|
12718
12721
|
case 0:
|
|
12719
12722
|
if (i = this.browserStorage.getCachedRequest(r, this.browserCrypto), this.logger.verbose("handleHash called, retrieved cached request"), a = le.getDeserializedHash(t), a.accountId) {
|
|
12720
12723
|
if (this.logger.verbose("Account id found in hash, calling WAM for token"), !this.nativeMessageHandler)
|
|
12721
|
-
throw
|
|
12724
|
+
throw q.createNativeConnectionNotEstablishedError();
|
|
12722
12725
|
return s = new Bn(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, Ce.acquireTokenPopup, this.performanceClient, this.nativeMessageHandler, a.accountId, this.nativeStorage, i.correlationId), u = tn.parseRequestState(this.browserCrypto, r).userRequestState, [2, s.acquireToken($($({}, i), {
|
|
12723
12726
|
state: u,
|
|
12724
12727
|
prompt: void 0
|
|
@@ -12728,7 +12731,7 @@ var gs = (
|
|
|
12728
12731
|
})];
|
|
12729
12732
|
}
|
|
12730
12733
|
if (p = this.browserStorage.getCachedAuthority(r), !p)
|
|
12731
|
-
throw
|
|
12734
|
+
throw q.createNoCachedAuthorityError();
|
|
12732
12735
|
return this.performanceClient.setPreQueueTime(A.StandardInteractionClientCreateAuthCodeClient, i.correlationId), [4, this.createAuthCodeClient(o, p)];
|
|
12733
12736
|
case 1:
|
|
12734
12737
|
return l = k.sent(), this.logger.verbose("Auth code client created"), Tr.removeThrottle(this.browserStorage, this.config.auth.clientId, i), m = new Go(l, this.browserStorage, i, this.logger, this.browserCrypto, this.performanceClient), [4, m.handleCodeResponseFromHash(t, r, l.authority, this.networkClient)];
|
|
@@ -12847,7 +12850,7 @@ var ms = (
|
|
|
12847
12850
|
success: !0,
|
|
12848
12851
|
isNativeBroker: !0
|
|
12849
12852
|
}), !this.nativeMessageHandler)
|
|
12850
|
-
throw
|
|
12853
|
+
throw q.createNativeConnectionNotEstablishedError();
|
|
12851
12854
|
return T = new Bn(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, Ce.acquireTokenPopup, this.performanceClient, this.nativeMessageHandler, K.accountId, this.nativeStorage, s.correlationId), D = tn.parseRequestState(this.browserCrypto, z).userRequestState, [2, T.acquireToken($($({}, s), {
|
|
12852
12855
|
state: D,
|
|
12853
12856
|
prompt: void 0
|
|
@@ -12900,7 +12903,7 @@ var ms = (
|
|
|
12900
12903
|
});
|
|
12901
12904
|
}, e.prototype.initiateAuthRequest = function(t, r) {
|
|
12902
12905
|
if (V.isEmpty(t))
|
|
12903
|
-
throw this.logger.error("Navigate url is empty"),
|
|
12906
|
+
throw this.logger.error("Navigate url is empty"), q.createEmptyNavigationUriError();
|
|
12904
12907
|
return this.logger.infoPii("Navigate to: " + t), this.openPopup(t, r);
|
|
12905
12908
|
}, e.prototype.monitorPopupForHash = function(t) {
|
|
12906
12909
|
var r = this;
|
|
@@ -12909,7 +12912,7 @@ var ms = (
|
|
|
12909
12912
|
r.logger.verbose("PopupHandler.monitorPopupForHash - polling started");
|
|
12910
12913
|
var u = setInterval(function() {
|
|
12911
12914
|
if (t.closed) {
|
|
12912
|
-
r.logger.error("PopupHandler.monitorPopupForHash - window closed"), r.cleanPopup(), clearInterval(u), i(
|
|
12915
|
+
r.logger.error("PopupHandler.monitorPopupForHash - window closed"), r.cleanPopup(), clearInterval(u), i(q.createUserCancelledError());
|
|
12913
12916
|
return;
|
|
12914
12917
|
}
|
|
12915
12918
|
var p = w.EMPTY_STRING, l = w.EMPTY_STRING;
|
|
@@ -12917,7 +12920,7 @@ var ms = (
|
|
|
12917
12920
|
p = t.location.href, l = t.location.hash;
|
|
12918
12921
|
} catch {
|
|
12919
12922
|
}
|
|
12920
|
-
V.isEmpty(p) || p === "about:blank" || (r.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"), s++, l ? (r.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"), clearInterval(u), r.cleanPopup(t), le.hashContainsKnownProperties(l) ? (r.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."), o(l)) : (r.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."), r.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: " + l), i(
|
|
12923
|
+
V.isEmpty(p) || p === "about:blank" || (r.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"), s++, l ? (r.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"), clearInterval(u), r.cleanPopup(t), le.hashContainsKnownProperties(l) ? (r.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."), o(l)) : (r.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."), r.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: " + l), i(q.createHashDoesNotContainKnownPropertiesError()))) : s > a && (r.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"), clearInterval(u), i(q.createMonitorPopupTimeoutError())));
|
|
12921
12924
|
}, r.config.system.pollIntervalMilliseconds);
|
|
12922
12925
|
});
|
|
12923
12926
|
}, e.prototype.waitForLogoutPopup = function(t) {
|
|
@@ -12938,10 +12941,10 @@ var ms = (
|
|
|
12938
12941
|
try {
|
|
12939
12942
|
var o = void 0;
|
|
12940
12943
|
if (r.popup ? (o = r.popup, this.logger.verbosePii("Navigating popup window to: " + t), o.location.assign(t)) : typeof r.popup > "u" && (this.logger.verbosePii("Opening popup window to: " + t), o = this.openSizedPopup(t, r.popupName, r.popupWindowAttributes)), !o)
|
|
12941
|
-
throw
|
|
12944
|
+
throw q.createEmptyWindowCreatedError();
|
|
12942
12945
|
return o.focus && o.focus(), this.currentWindow = o, window.addEventListener("beforeunload", this.unloadWindow), o;
|
|
12943
12946
|
} catch (i) {
|
|
12944
|
-
throw this.logger.error("error opening popup " + i.message), this.browserStorage.setInteractionInProgress(!1),
|
|
12947
|
+
throw this.logger.error("error opening popup " + i.message), this.browserStorage.setInteractionInProgress(!1), q.createPopupWindowError(i.toString());
|
|
12945
12948
|
}
|
|
12946
12949
|
}, e.prototype.openSizedPopup = function(t, r, o) {
|
|
12947
12950
|
var i, a, s, u, p = window.screenLeft ? window.screenLeft : window.screenX, l = window.screenTop ? window.screenTop : window.screenY, m = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, f = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, k = (i = o.popupSize) === null || i === void 0 ? void 0 : i.width, E = (a = o.popupSize) === null || a === void 0 ? void 0 : a.height, P = (s = o.popupPosition) === null || s === void 0 ? void 0 : s.top, j = (u = o.popupPosition) === null || u === void 0 ? void 0 : u.left;
|
|
@@ -13057,7 +13060,7 @@ var Ei = (
|
|
|
13057
13060
|
switch (r.label) {
|
|
13058
13061
|
case 0:
|
|
13059
13062
|
if (this.performanceClient.addQueueMeasurement(A.SilentHandlerInitiateAuthRequest, this.authCodeRequest.correlationId), V.isEmpty(t))
|
|
13060
|
-
throw this.logger.info("Navigate url is empty"),
|
|
13063
|
+
throw this.logger.info("Navigate url is empty"), q.createEmptyNavigationUriError();
|
|
13061
13064
|
return this.navigateFrameWait ? (this.performanceClient.setPreQueueTime(A.SilentHandlerLoadFrame, this.authCodeRequest.correlationId), [4, this.loadFrame(t)]) : [3, 2];
|
|
13062
13065
|
case 1:
|
|
13063
13066
|
return [2, r.sent()];
|
|
@@ -13072,7 +13075,7 @@ var Ei = (
|
|
|
13072
13075
|
r < so && o.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower (" + r + "ms) than the default (" + so + "ms). This may result in timeouts.");
|
|
13073
13076
|
var s = window.performance.now(), u = s + r, p = setInterval(function() {
|
|
13074
13077
|
if (window.performance.now() > u) {
|
|
13075
|
-
o.removeHiddenIframe(t), clearInterval(p), a(
|
|
13078
|
+
o.removeHiddenIframe(t), clearInterval(p), a(q.createMonitorIframeTimeoutError());
|
|
13076
13079
|
return;
|
|
13077
13080
|
}
|
|
13078
13081
|
var l = w.EMPTY_STRING, m = t.contentWindow;
|
|
@@ -13130,7 +13133,7 @@ var ks = (
|
|
|
13130
13133
|
if (this.performanceClient.addQueueMeasurement(A.SilentIframeClientAcquireToken, t.correlationId), this.logger.verbose("acquireTokenByIframe called"), r = this.performanceClient.startMeasurement(A.SilentIframeClientAcquireToken, t.correlationId), V.isEmpty(t.loginHint) && V.isEmpty(t.sid) && (!t.account || V.isEmpty(t.account.username)) && this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."), t.prompt && t.prompt !== Ze.NONE && t.prompt !== Ze.NO_SESSION)
|
|
13131
13134
|
throw r.endMeasurement({
|
|
13132
13135
|
success: !1
|
|
13133
|
-
}),
|
|
13136
|
+
}), q.createSilentPromptValueError(t.prompt);
|
|
13134
13137
|
return this.performanceClient.setPreQueueTime(A.StandardInteractionClientInitializeAuthorizationRequest, t.correlationId), [4, this.initializeAuthorizationRequest($($({}, t), { prompt: t.prompt || Ze.NONE }), W.Silent)];
|
|
13135
13138
|
case 1:
|
|
13136
13139
|
o = u.sent(), this.browserStorage.updateCacheEntries(o.state, o.nonce, o.authority, o.loginHint || w.EMPTY_STRING, o.account || null), i = this.initializeServerTelemetryManager(this.apiId), u.label = 2;
|
|
@@ -13161,7 +13164,7 @@ var ks = (
|
|
|
13161
13164
|
});
|
|
13162
13165
|
});
|
|
13163
13166
|
}, e.prototype.logout = function() {
|
|
13164
|
-
return Promise.reject(
|
|
13167
|
+
return Promise.reject(q.createSilentLogoutUnsupportedError());
|
|
13165
13168
|
}, e.prototype.silentTokenHelper = function(t, r) {
|
|
13166
13169
|
return O(this, void 0, void 0, function() {
|
|
13167
13170
|
var o, i, a, s, u, p, l, m, f, k = this;
|
|
@@ -13178,7 +13181,7 @@ var ks = (
|
|
|
13178
13181
|
case 4:
|
|
13179
13182
|
if (u = E.sent(), p = le.getDeserializedHash(u), l = this.validateAndExtractStateFromHash(p, W.Silent, o.correlationId), p.accountId) {
|
|
13180
13183
|
if (this.logger.verbose("Account id found in hash, calling WAM for token"), !this.nativeMessageHandler)
|
|
13181
|
-
throw
|
|
13184
|
+
throw q.createNativeConnectionNotEstablishedError();
|
|
13182
13185
|
return m = new Bn(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, this.apiId, this.performanceClient, this.nativeMessageHandler, p.accountId, this.browserStorage, this.correlationId), f = tn.parseRequestState(this.browserCrypto, l).userRequestState, [2, m.acquireToken($($({}, r), { state: f, prompt: r.prompt || Ze.NONE })).finally(function() {
|
|
13183
13186
|
k.browserStorage.cleanRequestByState(l);
|
|
13184
13187
|
})];
|
|
@@ -13225,7 +13228,7 @@ var Cs = (
|
|
|
13225
13228
|
});
|
|
13226
13229
|
});
|
|
13227
13230
|
}, e.prototype.logout = function() {
|
|
13228
|
-
return Promise.reject(
|
|
13231
|
+
return Promise.reject(q.createSilentLogoutUnsupportedError());
|
|
13229
13232
|
}, e.prototype.createRefreshTokenClient = function(t, r, o) {
|
|
13230
13233
|
return O(this, void 0, void 0, function() {
|
|
13231
13234
|
var i;
|
|
@@ -13456,7 +13459,7 @@ var Ss = 32, Is = (
|
|
|
13456
13459
|
var t = this.base64Encode.urlEncodeArr(e);
|
|
13457
13460
|
return t;
|
|
13458
13461
|
} catch (r) {
|
|
13459
|
-
throw
|
|
13462
|
+
throw q.createPkceNotGeneratedError(r);
|
|
13460
13463
|
}
|
|
13461
13464
|
}, n.prototype.generateCodeChallengeFromVerifier = function(e) {
|
|
13462
13465
|
return O(this, void 0, void 0, function() {
|
|
@@ -13468,7 +13471,7 @@ var Ss = 32, Is = (
|
|
|
13468
13471
|
case 1:
|
|
13469
13472
|
return t = o.sent(), [2, this.base64Encode.urlEncodeArr(new Uint8Array(t))];
|
|
13470
13473
|
case 2:
|
|
13471
|
-
throw r = o.sent(),
|
|
13474
|
+
throw r = o.sent(), q.createPkceNotGeneratedError(r);
|
|
13472
13475
|
case 3:
|
|
13473
13476
|
return [
|
|
13474
13477
|
2
|
|
@@ -13659,7 +13662,7 @@ var Ms = "RSASSA-PKCS1-v1_5", Vo = "SHA-256", Ns = 2048, Os = new Uint8Array([1,
|
|
|
13659
13662
|
else if (this.hasMsrCrypto() && (!((r = this.cryptoOptions) === null || r === void 0) && r.useMsrCrypto))
|
|
13660
13663
|
this.logger.verbose("BrowserCrypto: MSR crypto interface available"), this.subtleCrypto = new Rs();
|
|
13661
13664
|
else
|
|
13662
|
-
throw this.hasMsrCrypto() && this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"), this.logger.error("BrowserCrypto: No crypto interfaces available."),
|
|
13665
|
+
throw this.hasMsrCrypto() && this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"), this.logger.error("BrowserCrypto: No crypto interfaces available."), q.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");
|
|
13663
13666
|
if (this.subtleCrypto.initPrng) {
|
|
13664
13667
|
if (this.logger.verbose("BrowserCrypto: Interface requires entropy"), !(!((o = this.cryptoOptions) === null || o === void 0) && o.entropy))
|
|
13665
13668
|
throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."), Pr.createEntropyNotProvided();
|
|
@@ -13734,7 +13737,7 @@ var Ls = (
|
|
|
13734
13737
|
var s = a;
|
|
13735
13738
|
e.db = s.target.result, e.dbOpen = !0, r();
|
|
13736
13739
|
}), i.addEventListener("error", function() {
|
|
13737
|
-
return o(
|
|
13740
|
+
return o(q.createDatabaseUnavailableError());
|
|
13738
13741
|
});
|
|
13739
13742
|
})];
|
|
13740
13743
|
});
|
|
@@ -13768,7 +13771,7 @@ var Ls = (
|
|
|
13768
13771
|
case 1:
|
|
13769
13772
|
return r.sent(), [2, new Promise(function(o, i) {
|
|
13770
13773
|
if (!t.db)
|
|
13771
|
-
return i(
|
|
13774
|
+
return i(q.createDatabaseNotOpenError());
|
|
13772
13775
|
var a = t.db.transaction([t.tableName], "readonly"), s = a.objectStore(t.tableName), u = s.get(e);
|
|
13773
13776
|
u.addEventListener("success", function(p) {
|
|
13774
13777
|
var l = p;
|
|
@@ -13790,7 +13793,7 @@ var Ls = (
|
|
|
13790
13793
|
case 1:
|
|
13791
13794
|
return o.sent(), [2, new Promise(function(i, a) {
|
|
13792
13795
|
if (!r.db)
|
|
13793
|
-
return a(
|
|
13796
|
+
return a(q.createDatabaseNotOpenError());
|
|
13794
13797
|
var s = r.db.transaction([r.tableName], "readwrite"), u = s.objectStore(r.tableName), p = u.put(t, e);
|
|
13795
13798
|
p.addEventListener("success", function() {
|
|
13796
13799
|
r.closeConnection(), i();
|
|
@@ -13811,7 +13814,7 @@ var Ls = (
|
|
|
13811
13814
|
case 1:
|
|
13812
13815
|
return r.sent(), [2, new Promise(function(o, i) {
|
|
13813
13816
|
if (!t.db)
|
|
13814
|
-
return i(
|
|
13817
|
+
return i(q.createDatabaseNotOpenError());
|
|
13815
13818
|
var a = t.db.transaction([t.tableName], "readwrite"), s = a.objectStore(t.tableName), u = s.delete(e);
|
|
13816
13819
|
u.addEventListener("success", function() {
|
|
13817
13820
|
t.closeConnection(), o();
|
|
@@ -13832,7 +13835,7 @@ var Ls = (
|
|
|
13832
13835
|
case 1:
|
|
13833
13836
|
return t.sent(), [2, new Promise(function(r, o) {
|
|
13834
13837
|
if (!e.db)
|
|
13835
|
-
return o(
|
|
13838
|
+
return o(q.createDatabaseNotOpenError());
|
|
13836
13839
|
var i = e.db.transaction([e.tableName], "readonly"), a = i.objectStore(e.tableName), s = a.getAllKeys();
|
|
13837
13840
|
s.addEventListener("success", function(u) {
|
|
13838
13841
|
var p = u;
|
|
@@ -13854,7 +13857,7 @@ var Ls = (
|
|
|
13854
13857
|
case 1:
|
|
13855
13858
|
return r.sent(), [2, new Promise(function(o, i) {
|
|
13856
13859
|
if (!t.db)
|
|
13857
|
-
return i(
|
|
13860
|
+
return i(q.createDatabaseNotOpenError());
|
|
13858
13861
|
var a = t.db.transaction([t.tableName], "readonly"), s = a.objectStore(t.tableName), u = s.count(e);
|
|
13859
13862
|
u.addEventListener("success", function(p) {
|
|
13860
13863
|
var l = p;
|
|
@@ -13892,7 +13895,7 @@ var Qo = (
|
|
|
13892
13895
|
this.inMemoryCache = new io(), this.indexedDBCache = new Ls(), this.logger = e, this.storeName = t;
|
|
13893
13896
|
}
|
|
13894
13897
|
return n.prototype.handleDatabaseAccessError = function(e) {
|
|
13895
|
-
if (e instanceof
|
|
13898
|
+
if (e instanceof q && e.errorCode === U.databaseUnavailable.code)
|
|
13896
13899
|
this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");
|
|
13897
13900
|
else
|
|
13898
13901
|
throw e;
|
|
@@ -14145,7 +14148,7 @@ var xs = (
|
|
|
14145
14148
|
return i = (o = this.performanceClient) === null || o === void 0 ? void 0 : o.startMeasurement(A.CryptoOptsSignJwt, r), [4, this.cache.asymmetricKeys.getItem(t)];
|
|
14146
14149
|
case 1:
|
|
14147
14150
|
if (a = z.sent(), !a)
|
|
14148
|
-
throw
|
|
14151
|
+
throw q.createSigningKeyNotFoundInStorageError(t);
|
|
14149
14152
|
return [4, this.browserCrypto.exportJwk(a.publicKey)];
|
|
14150
14153
|
case 2:
|
|
14151
14154
|
return s = z.sent(), u = nn.getSortedObjectString(s), p = this.b64Encode.urlEncode(JSON.stringify({ kid: t })), l = ss.getShrHeaderString({ kid: p, alg: s.alg }), m = this.b64Encode.urlEncode(l), e.cnf = {
|
|
@@ -14291,7 +14294,7 @@ var Bs = (
|
|
|
14291
14294
|
}
|
|
14292
14295
|
return n.prototype.loadExternalTokens = function(e, t, r) {
|
|
14293
14296
|
if (this.logger.info("TokenCache - loadExternalTokens called"), !t.id_token)
|
|
14294
|
-
throw
|
|
14297
|
+
throw q.createUnableToLoadTokenError("Please ensure server response includes id token.");
|
|
14295
14298
|
var o = new Vt(t.id_token, this.cryptoObj), i, a;
|
|
14296
14299
|
if (e.account) {
|
|
14297
14300
|
var s = this.loadAccount(o, e.account.environment, void 0, void 0, e.account.homeAccountId);
|
|
@@ -14313,41 +14316,41 @@ var Bs = (
|
|
|
14313
14316
|
var s = this.loadAccount(o, a.hostnameAndPort, t.client_info, a.authorityType);
|
|
14314
14317
|
i = new tr(s, this.loadIdToken(o, s.homeAccountId, a.hostnameAndPort, a.tenant), this.loadAccessToken(e, t, s.homeAccountId, a.hostnameAndPort, a.tenant, r), this.loadRefreshToken(e, t, s.homeAccountId, a.hostnameAndPort));
|
|
14315
14318
|
} else
|
|
14316
|
-
throw
|
|
14319
|
+
throw q.createUnableToLoadTokenError("Please provide clientInfo in the response or options.");
|
|
14317
14320
|
} else
|
|
14318
|
-
throw
|
|
14321
|
+
throw q.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");
|
|
14319
14322
|
return this.generateAuthenticationResult(e, o, i, a);
|
|
14320
14323
|
}, n.prototype.loadAccount = function(e, t, r, o, i) {
|
|
14321
14324
|
var a;
|
|
14322
14325
|
if (i ? a = i : o !== void 0 && r && (a = Ke.generateHomeAccountId(r, o, this.logger, this.cryptoObj, e)), !a)
|
|
14323
|
-
throw
|
|
14326
|
+
throw q.createUnableToLoadTokenError("Unexpected missing homeAccountId");
|
|
14324
14327
|
var s = r ? Ke.createAccount(r, a, e, void 0, void 0, void 0, t) : Ke.createGenericAccount(a, e, void 0, void 0, void 0, t);
|
|
14325
14328
|
if (this.isBrowserEnvironment)
|
|
14326
14329
|
return this.logger.verbose("TokenCache - loading account"), this.storage.setAccount(s), s;
|
|
14327
|
-
throw
|
|
14330
|
+
throw q.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.");
|
|
14328
14331
|
}, n.prototype.loadIdToken = function(e, t, r, o) {
|
|
14329
14332
|
var i = Cn.createIdTokenEntity(t, r, e.rawToken, this.config.auth.clientId, o);
|
|
14330
14333
|
if (this.isBrowserEnvironment)
|
|
14331
14334
|
return this.logger.verbose("TokenCache - loading id token"), this.storage.setIdTokenCredential(i), i;
|
|
14332
|
-
throw
|
|
14335
|
+
throw q.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.");
|
|
14333
14336
|
}, n.prototype.loadAccessToken = function(e, t, r, o, i, a) {
|
|
14334
14337
|
if (!t.access_token)
|
|
14335
14338
|
return this.logger.verbose("TokenCache - No access token provided for caching"), null;
|
|
14336
14339
|
if (!t.expires_in)
|
|
14337
|
-
throw
|
|
14340
|
+
throw q.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");
|
|
14338
14341
|
if (!a.extendedExpiresOn)
|
|
14339
|
-
throw
|
|
14342
|
+
throw q.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");
|
|
14340
14343
|
var s = new Xe(e.scopes).printScopes(), u = a.expiresOn || t.expires_in + (/* @__PURE__ */ new Date()).getTime() / 1e3, p = a.extendedExpiresOn, l = En.createAccessTokenEntity(r, o, t.access_token, this.config.auth.clientId, i, s, u, p, this.cryptoObj);
|
|
14341
14344
|
if (this.isBrowserEnvironment)
|
|
14342
14345
|
return this.logger.verbose("TokenCache - loading access token"), this.storage.setAccessTokenCredential(l), l;
|
|
14343
|
-
throw
|
|
14346
|
+
throw q.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.");
|
|
14344
14347
|
}, n.prototype.loadRefreshToken = function(e, t, r, o) {
|
|
14345
14348
|
if (!t.refresh_token)
|
|
14346
14349
|
return this.logger.verbose("TokenCache - No refresh token provided for caching"), null;
|
|
14347
14350
|
var i = On.createRefreshTokenEntity(r, o, t.refresh_token, this.config.auth.clientId);
|
|
14348
14351
|
if (this.isBrowserEnvironment)
|
|
14349
14352
|
return this.logger.verbose("TokenCache - loading refresh token"), this.storage.setRefreshTokenCredential(i), i;
|
|
14350
|
-
throw
|
|
14353
|
+
throw q.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.");
|
|
14351
14354
|
}, n.prototype.generateAuthenticationResult = function(e, t, r, o) {
|
|
14352
14355
|
var i, a, s, u = w.EMPTY_STRING, p = [], l = null, m;
|
|
14353
14356
|
r != null && r.accessToken && (u = r.accessToken.secret, p = Xe.fromString(r.accessToken.target).asArray(), l = new Date(Number(r.accessToken.expiresOn) * 1e3), m = new Date(Number(r.accessToken.extendedExpiresOn) * 1e3));
|
|
@@ -14405,7 +14408,7 @@ var Hs = (
|
|
|
14405
14408
|
switch (l.label) {
|
|
14406
14409
|
case 0:
|
|
14407
14410
|
if (this.logger.trace("SilentAuthCodeClient.acquireToken called"), !t.code)
|
|
14408
|
-
throw
|
|
14411
|
+
throw q.createAuthCodeRequiredError();
|
|
14409
14412
|
return this.performanceClient.setPreQueueTime(A.StandardInteractionClientInitializeAuthorizationRequest, t.correlationId), [4, this.initializeAuthorizationRequest(t, W.Silent)];
|
|
14410
14413
|
case 1:
|
|
14411
14414
|
r = l.sent(), this.browserStorage.updateCacheEntries(r.state, r.nonce, r.authority, r.loginHint || w.EMPTY_STRING, r.account || null), o = this.initializeServerTelemetryManager(this.apiId), l.label = 2;
|
|
@@ -14429,7 +14432,7 @@ var Hs = (
|
|
|
14429
14432
|
});
|
|
14430
14433
|
});
|
|
14431
14434
|
}, e.prototype.logout = function() {
|
|
14432
|
-
return Promise.reject(
|
|
14435
|
+
return Promise.reject(q.createSilentLogoutUnsupportedError());
|
|
14433
14436
|
}, e;
|
|
14434
14437
|
}(Gn)
|
|
14435
14438
|
);
|
|
@@ -14617,7 +14620,7 @@ var js = (
|
|
|
14617
14620
|
t = this.getRequestCorrelationId(e), this.preflightBrowserEnvironmentCheck(W.Silent), this.logger.trace("acquireTokenByCode called", t), this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_START, W.Silent, e), r = this.performanceClient.startMeasurement(A.AcquireTokenByCode, e.correlationId);
|
|
14618
14621
|
try {
|
|
14619
14622
|
if (e.code && e.nativeAccountId)
|
|
14620
|
-
throw
|
|
14623
|
+
throw q.createSpaCodeAndNativeAccountIdPresentError();
|
|
14621
14624
|
if (e.code)
|
|
14622
14625
|
return o = e.code, i = this.hybridAuthCodeResponses.get(o), i ? (this.logger.verbose("Existing acquireTokenByCode request found", e.correlationId), r.discardMeasurement()) : (this.logger.verbose("Initiating new acquireTokenByCode request", t), i = this.acquireTokenByCodeAsync($($({}, e), { correlationId: t })).then(function(u) {
|
|
14623
14626
|
return a.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_SUCCESS, W.Silent, u), a.hybridAuthCodeResponses.delete(o), r.addStaticFields({
|
|
@@ -14640,9 +14643,9 @@ var js = (
|
|
|
14640
14643
|
return [2, this.acquireTokenNative(e, Ce.acquireTokenByCode, e.nativeAccountId).catch(function(u) {
|
|
14641
14644
|
throw u instanceof Kt && u.isFatal() && (a.nativeExtensionProvider = void 0), u;
|
|
14642
14645
|
})];
|
|
14643
|
-
throw
|
|
14646
|
+
throw q.createUnableToAcquireTokenFromNativePlatformError();
|
|
14644
14647
|
} else
|
|
14645
|
-
throw
|
|
14648
|
+
throw q.createAuthCodeOrNativeAccountIdRequiredError();
|
|
14646
14649
|
} catch (u) {
|
|
14647
14650
|
throw this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_FAILURE, W.Silent, null, u), r.endMeasurement({
|
|
14648
14651
|
errorCode: u instanceof X && u.errorCode || void 0,
|
|
@@ -14786,7 +14789,7 @@ var js = (
|
|
|
14786
14789
|
var o;
|
|
14787
14790
|
return L(this, function(i) {
|
|
14788
14791
|
if (this.logger.trace("acquireTokenNative called"), !this.nativeExtensionProvider)
|
|
14789
|
-
throw
|
|
14792
|
+
throw q.createNativeConnectionNotEstablishedError();
|
|
14790
14793
|
return o = new Bn(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, t, this.performanceClient, this.nativeExtensionProvider, r || this.getNativeAccountId(e), this.nativeInternalStorage, e.correlationId), [2, o.acquireToken(e)];
|
|
14791
14794
|
});
|
|
14792
14795
|
});
|
|
@@ -14874,7 +14877,7 @@ var Fs = (
|
|
|
14874
14877
|
if (r = this.getRequestCorrelationId(t), o = this.performanceClient.startMeasurement(A.AcquireTokenSilent, r), o.addStaticFields({
|
|
14875
14878
|
cacheLookupPolicy: t.cacheLookupPolicy
|
|
14876
14879
|
}), this.preflightBrowserEnvironmentCheck(W.Silent), this.logger.verbose("acquireTokenSilent called", r), i = t.account || this.getActiveAccount(), !i)
|
|
14877
|
-
throw
|
|
14880
|
+
throw q.createNoAccountError();
|
|
14878
14881
|
return a = {
|
|
14879
14882
|
clientId: this.config.auth.clientId,
|
|
14880
14883
|
authority: t.authority || w.EMPTY_STRING,
|
|
@@ -15056,7 +15059,7 @@ const Ks = ar("MsAuthPlugin", {
|
|
|
15056
15059
|
$e.microsoftSDK(r, this.$storex)
|
|
15057
15060
|
);
|
|
15058
15061
|
if (i)
|
|
15059
|
-
return this.microsoftLoad = !1, this.microsoftSSOLoad = !1,
|
|
15062
|
+
return this.microsoftLoad = !1, this.microsoftSSOLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 }), this.errorHandler(i);
|
|
15060
15063
|
if (a.data.success) {
|
|
15061
15064
|
if (this.display === "popup")
|
|
15062
15065
|
return (o = window.parent) == null ? void 0 : o.postMessage(
|
|
@@ -15069,10 +15072,10 @@ const Ks = ar("MsAuthPlugin", {
|
|
|
15069
15072
|
} else
|
|
15070
15073
|
this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err);
|
|
15071
15074
|
} else
|
|
15072
|
-
this.microsoftLoad = !1, this.microsoftSSOLoad = !1,
|
|
15075
|
+
this.microsoftLoad = !1, this.microsoftSSOLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
15073
15076
|
},
|
|
15074
15077
|
ssoLogin() {
|
|
15075
|
-
|
|
15078
|
+
F.$emit("toggleSSOModal");
|
|
15076
15079
|
}
|
|
15077
15080
|
}
|
|
15078
15081
|
}, Dn = {
|
|
@@ -15185,12 +15188,12 @@ const Ks = ar("MsAuthPlugin", {
|
|
|
15185
15188
|
localStorage.removeItem("pkce_code_verifier");
|
|
15186
15189
|
let r = { accessToken: (o = t.data) == null ? void 0 : o.access_token, domain: n.domain };
|
|
15187
15190
|
if (this.display === "popup" && (r.response_type = "code"), [e, t] = await fe($e.oktaSDK(r, this.$storex)), e)
|
|
15188
|
-
return this.oktaLoad = !1,
|
|
15191
|
+
return this.oktaLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 }), this.errorHandler(e);
|
|
15189
15192
|
if (t.data.success) {
|
|
15190
15193
|
if (this.display === "popup")
|
|
15191
15194
|
return (i = window.parent) == null ? void 0 : i.postMessage({ code: t.data.auth_code, state: this.$route.query.state }, "*");
|
|
15192
15195
|
await this.loginSetup(t), await this.getLoggedInAccounts(), this.$router.push("/" + t.data.data.username + "#edit"), setTimeout(() => {
|
|
15193
|
-
this.appleLoad = !1,
|
|
15196
|
+
this.appleLoad = !1, F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
15194
15197
|
}, 1e3);
|
|
15195
15198
|
} else
|
|
15196
15199
|
this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err);
|
|
@@ -15215,7 +15218,7 @@ const Ks = ar("MsAuthPlugin", {
|
|
|
15215
15218
|
const a = new URLSearchParams(e);
|
|
15216
15219
|
t = a.get("client_id"), r = a.get("domain"), o = a.get("platform");
|
|
15217
15220
|
}
|
|
15218
|
-
window.opener ? (window.opener.postMessage(i, location.origin), window.close()) : (this.isNative && this.isIOS && await yr.close(),
|
|
15221
|
+
window.opener ? (window.opener.postMessage(i, location.origin), window.close()) : (this.isNative && this.isIOS && await yr.close(), F.$emit("ssoEvent", { name: "setLoading", data: !0 }), n && t && r && await this.exchangeCode({ code: n, clientID: t, domain: r, platform: o }), localStorage.removeItem("pkce_code_verifier"), F.$emit("ssoEvent", { name: "setLoading", data: !1 }));
|
|
15219
15222
|
}
|
|
15220
15223
|
}
|
|
15221
15224
|
}, xr = {
|
|
@@ -15257,12 +15260,12 @@ const Ks = ar("MsAuthPlugin", {
|
|
|
15257
15260
|
if (this.$route.query.code && (e.code = this.$route.query.code), window.opener)
|
|
15258
15261
|
window.opener.postMessage(e, location.origin), window.close();
|
|
15259
15262
|
else {
|
|
15260
|
-
if (this.isNative && this.isIOS && await yr.close(),
|
|
15263
|
+
if (this.isNative && this.isIOS && await yr.close(), F.$emit("ssoEvent", { name: "setLoading", data: !0 }), this.$route.query.code && (n = this.$route.query.code), console.log(this.display, { code: n }), n) {
|
|
15261
15264
|
if (this.display === "popup")
|
|
15262
15265
|
return (t = window.parent) == null ? void 0 : t.postMessage({ code: n, state: this.$route.query.state }, "*");
|
|
15263
15266
|
await this.exchangeAuthCode({ code: n, code_verifier: localStorage.getItem("pkce_code_verifier") });
|
|
15264
15267
|
}
|
|
15265
|
-
localStorage.removeItem("pkce_code_verifier"),
|
|
15268
|
+
localStorage.removeItem("pkce_code_verifier"), F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
15266
15269
|
}
|
|
15267
15270
|
}
|
|
15268
15271
|
}
|
|
@@ -16200,7 +16203,7 @@ const Ri = {
|
|
|
16200
16203
|
}
|
|
16201
16204
|
},
|
|
16202
16205
|
async mounted() {
|
|
16203
|
-
this.renderView === "AuthMFA" && (await this.getAccountSettings(), this.generateOTPQrCode()),
|
|
16206
|
+
this.renderView === "AuthMFA" && (await this.getAccountSettings(), this.generateOTPQrCode()), F.$on("otpSubmitted", this.otpSubmitted);
|
|
16204
16207
|
},
|
|
16205
16208
|
methods: {
|
|
16206
16209
|
otpSubmitted(n) {
|
|
@@ -16222,10 +16225,10 @@ const Ri = {
|
|
|
16222
16225
|
}
|
|
16223
16226
|
},
|
|
16224
16227
|
async cancelMFA() {
|
|
16225
|
-
|
|
16228
|
+
F.$emit("ssoEvent", { name: "mfaCancel", data: !0 });
|
|
16226
16229
|
},
|
|
16227
16230
|
async validateMFA() {
|
|
16228
|
-
|
|
16231
|
+
F.$emit("toggleOTPModal", !0);
|
|
16229
16232
|
}
|
|
16230
16233
|
}
|
|
16231
16234
|
}, Gs = {
|
|
@@ -16348,7 +16351,7 @@ const Ri = {
|
|
|
16348
16351
|
if (this.$route.path === "/login/callback/saml")
|
|
16349
16352
|
return await this.handleSamlRedirect();
|
|
16350
16353
|
this.$route.query.qrLogin && this.changeLoginToQr(), setTimeout(() => {
|
|
16351
|
-
this.$storex && this.$storex.token ? this.$router.push(this.home) :
|
|
16354
|
+
this.$storex && this.$storex.token ? this.$router.push(this.home) : F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
16352
16355
|
}, 2500);
|
|
16353
16356
|
}
|
|
16354
16357
|
},
|
|
@@ -16370,10 +16373,10 @@ const Ri = {
|
|
|
16370
16373
|
t && console.error(t), this.submitted = !1, r === !0 && (this.emailOrUsername = "", this.password = "");
|
|
16371
16374
|
},
|
|
16372
16375
|
close() {
|
|
16373
|
-
|
|
16376
|
+
F.$emit("ssoEvent", { name: "toggleAuthModal", data: !0 });
|
|
16374
16377
|
},
|
|
16375
16378
|
createAccountModal() {
|
|
16376
|
-
|
|
16379
|
+
F.$emit("ssoEvent", { name: "toggleAddAccountModalRegister", data: {} });
|
|
16377
16380
|
}
|
|
16378
16381
|
},
|
|
16379
16382
|
watch: {
|
|
@@ -16673,7 +16676,7 @@ const wo = /* @__PURE__ */ mt(Vs, [["render", Fc]]), qc = /* @__PURE__ */ Object
|
|
|
16673
16676
|
};
|
|
16674
16677
|
},
|
|
16675
16678
|
mounted() {
|
|
16676
|
-
this.isModal || (this.isLoggedIn ? this.$router.push(this.home) : !this.$route.query.state && !this.$route.query.oauth && !this.$route.params.oauth &&
|
|
16679
|
+
this.isModal || (this.isLoggedIn ? this.$router.push(this.home) : !this.$route.query.state && !this.$route.query.oauth && !this.$route.params.oauth && F.$emit("ssoEvent", { name: "setLoading", data: !1 }), this.invitationCode = this.$route.query.ic || "", this.$route.query.username && (this.usernameRegister = !0, this.emailLogin = !0, this.username = this.$route.query.username), this.$route.query.ref ? this.referral = this.$route.query.ref : this.$storex.referral && (this.referral = this.$storex.referral));
|
|
16677
16680
|
},
|
|
16678
16681
|
methods: {
|
|
16679
16682
|
async submit() {
|
|
@@ -16697,13 +16700,13 @@ const wo = /* @__PURE__ */ mt(Vs, [["render", Fc]]), qc = /* @__PURE__ */ Object
|
|
|
16697
16700
|
captchaToken: await this.getCaptchaToken("account_verify"),
|
|
16698
16701
|
ref: this.referral
|
|
16699
16702
|
}, e = await this.register(n);
|
|
16700
|
-
this.submitted = !1, e.data && e.data.success && (e.data.message === "SUCCESS_REGISTER" ? (this.isModal ?
|
|
16703
|
+
this.submitted = !1, e.data && e.data.success && (e.data.message === "SUCCESS_REGISTER" ? (this.isModal ? F.$emit("ssoEvent", { name: "toggleAddAccountModalVerify", data: !1 }) : this.$router.push("/verify"), this.successSnack(this.ssoLang[this.appLanguage].register_success), this.formButtonText = this.ssoLang[this.appLanguage].check_your_inbox) : e.data.message === "SUCCESS_LOGIN" && (this.display !== "popup" && (await this.loginSetup({ ...e, isModal: n.isModal }), await this.getLoggedInAccounts()), await this.loginSuccess({ ...e, isModal: n.isModal })));
|
|
16701
16704
|
},
|
|
16702
16705
|
close() {
|
|
16703
|
-
|
|
16706
|
+
F.$emit("ssoEvent", { name: "toggleAddAccountModal", data: !0 });
|
|
16704
16707
|
},
|
|
16705
16708
|
loginAccountModal() {
|
|
16706
|
-
|
|
16709
|
+
F.$emit("ssoEvent", { name: "toggleAddAccountModalLogin", data: !1 });
|
|
16707
16710
|
}
|
|
16708
16711
|
},
|
|
16709
16712
|
watch: {
|
|
@@ -16971,7 +16974,7 @@ const bo = /* @__PURE__ */ mt(Kc, [["render", xl]]), Ul = /* @__PURE__ */ Object
|
|
|
16971
16974
|
},
|
|
16972
16975
|
methods: {
|
|
16973
16976
|
init() {
|
|
16974
|
-
this.isLoggedIn ? this.$router.push(this.home) : (this.$storex.verifyEmail && (this.email = this.$storex.verifyEmail), this.$route.hash === "#reset" && (this.action = "reset"), this.$route.query.e && (this.email = this.$route.query.e), this.$route.query.c && (this.code = this.$route.query.c),
|
|
16977
|
+
this.isLoggedIn ? this.$router.push(this.home) : (this.$storex.verifyEmail && (this.email = this.$storex.verifyEmail), this.$route.hash === "#reset" && (this.action = "reset"), this.$route.query.e && (this.email = this.$route.query.e), this.$route.query.c && (this.code = this.$route.query.c), F.$emit("ssoEvent", { name: "setLoading", data: !1 }));
|
|
16975
16978
|
},
|
|
16976
16979
|
async submit() {
|
|
16977
16980
|
if (this.code.length !== 6)
|
|
@@ -16986,13 +16989,13 @@ const bo = /* @__PURE__ */ mt(Kc, [["render", xl]]), Ul = /* @__PURE__ */ Object
|
|
|
16986
16989
|
return !1;
|
|
16987
16990
|
this.submitted = !0;
|
|
16988
16991
|
let e = await this.verify(n);
|
|
16989
|
-
this.submitted = !1, e && e.data && e.data.success === !0 ? (this.action === "reset" && (this.$router.push("/reset?c=" + this.code + "&e=" + this.email), this.successSnack(this.ssoLang[this.appLanguage].verify_account_success)), this.action === "verify" && (this.isModal && (this.email = "", this.code = "",
|
|
16992
|
+
this.submitted = !1, e && e.data && e.data.success === !0 ? (this.action === "reset" && (this.$router.push("/reset?c=" + this.code + "&e=" + this.email), this.successSnack(this.ssoLang[this.appLanguage].verify_account_success)), this.action === "verify" && (this.isModal && (this.email = "", this.code = "", F.$emit("closeModal")), await this.loginSetup(e), await this.getLoggedInAccounts(), this.$storex.verifyEmail = "", this.$router.push("/" + e.data.data.username + "#edit"), this.successSnack(this.ssoLang[this.appLanguage].verify_account_success2))) : this.submitted = !1;
|
|
16990
16993
|
},
|
|
16991
16994
|
registerAccountModal() {
|
|
16992
|
-
|
|
16995
|
+
F.$emit("ssoEvent", { name: "toggleAddAccountModalRegister", data: !1 });
|
|
16993
16996
|
},
|
|
16994
16997
|
close() {
|
|
16995
|
-
|
|
16998
|
+
F.$emit("ssoEvent", { name: "toggleAddAccountModal", data: !0 });
|
|
16996
16999
|
}
|
|
16997
17000
|
},
|
|
16998
17001
|
watch: {
|
|
@@ -17152,7 +17155,7 @@ const ko = /* @__PURE__ */ mt(Bl, [["render", uu], ["__scopeId", "data-v-89d98ef
|
|
|
17152
17155
|
},
|
|
17153
17156
|
methods: {
|
|
17154
17157
|
close() {
|
|
17155
|
-
|
|
17158
|
+
F.$emit("ssoEvent", { name: "toggleAuthModal", data: !0 });
|
|
17156
17159
|
},
|
|
17157
17160
|
async submit() {
|
|
17158
17161
|
let n = {
|
|
@@ -17163,7 +17166,7 @@ const ko = /* @__PURE__ */ mt(Bl, [["render", uu], ["__scopeId", "data-v-89d98ef
|
|
|
17163
17166
|
this.mfaEnable || delete n.otpSecret, this.loading = !0;
|
|
17164
17167
|
const [e, t] = await fe($e.setMfa(n, this.$storex));
|
|
17165
17168
|
if (this.loading = !1, e)
|
|
17166
|
-
return
|
|
17169
|
+
return F.$emit("ssoEvent", { name: "setLoading", data: !1 }), this.errorHandler(e);
|
|
17167
17170
|
t.data.success && (this.getAccountSettings(), this.successSnack(t.data.message));
|
|
17168
17171
|
}
|
|
17169
17172
|
}
|
|
@@ -17293,7 +17296,7 @@ const Co = /* @__PURE__ */ mt(pu, [["render", zu]]), xu = /* @__PURE__ */ Object
|
|
|
17293
17296
|
};
|
|
17294
17297
|
},
|
|
17295
17298
|
mounted() {
|
|
17296
|
-
this.$storex.verifyEmail && (this.email = this.$storex.verifyEmail), this.$route.query.c && (this.code = this.$route.query.c, this.passwordChange = !0), this.$route.query.e && (this.email = this.$route.query.e),
|
|
17299
|
+
this.$storex.verifyEmail && (this.email = this.$storex.verifyEmail), this.$route.query.c && (this.code = this.$route.query.c, this.passwordChange = !0), this.$route.query.e && (this.email = this.$route.query.e), F.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
17297
17300
|
},
|
|
17298
17301
|
methods: {
|
|
17299
17302
|
async resetEmail() {
|
|
@@ -17563,11 +17566,11 @@ const To = /* @__PURE__ */ mt(bd, [["render", Sd]]), Id = /* @__PURE__ */ Object
|
|
|
17563
17566
|
};
|
|
17564
17567
|
},
|
|
17565
17568
|
mounted() {
|
|
17566
|
-
|
|
17569
|
+
F.$on("closeModal", () => {
|
|
17567
17570
|
this.toggle = !1, window.document.body.style.overflow = "auto", window.document.body.style.height = "auto";
|
|
17568
|
-
}),
|
|
17571
|
+
}), F.$on("openModalOverlay", () => {
|
|
17569
17572
|
this.toggle = !0;
|
|
17570
|
-
}),
|
|
17573
|
+
}), F.$on("toggleSSOLanguageModal", this.toggleModal), F.$on("toggleOTPModal", this.toggleModal), F.$on("toggleSSOModal", this.toggleModal), F.$on("toggleSSOPickModal", this.toggleModal);
|
|
17571
17574
|
},
|
|
17572
17575
|
methods: {
|
|
17573
17576
|
toggleModal(n = !0) {
|
|
@@ -17575,7 +17578,7 @@ const To = /* @__PURE__ */ mt(bd, [["render", Sd]]), Id = /* @__PURE__ */ Object
|
|
|
17575
17578
|
},
|
|
17576
17579
|
toggleEmit() {
|
|
17577
17580
|
var n, e;
|
|
17578
|
-
!this.isLoggedIn && ((e = (n = this.user) == null ? void 0 : n.lead_form) != null && e.forceFilling) ||
|
|
17581
|
+
!this.isLoggedIn && ((e = (n = this.user) == null ? void 0 : n.lead_form) != null && e.forceFilling) || F.$emit("closeModal");
|
|
17579
17582
|
}
|
|
17580
17583
|
}
|
|
17581
17584
|
};
|
|
@@ -17596,16 +17599,16 @@ const Pi = /* @__PURE__ */ mt(Ad, [["render", Rd], ["__scopeId", "data-v-17c9581
|
|
|
17596
17599
|
};
|
|
17597
17600
|
},
|
|
17598
17601
|
mounted() {
|
|
17599
|
-
|
|
17602
|
+
F.$on("toggleSSOModal", this.toggleModal), F.$on("closeModal", () => {
|
|
17600
17603
|
this.toggle = !1;
|
|
17601
17604
|
});
|
|
17602
17605
|
},
|
|
17603
17606
|
beforeDestroy() {
|
|
17604
|
-
|
|
17607
|
+
F._events.toggleSSOModal.pop();
|
|
17605
17608
|
},
|
|
17606
17609
|
methods: {
|
|
17607
17610
|
forceClose() {
|
|
17608
|
-
|
|
17611
|
+
F.$emit("closeModal");
|
|
17609
17612
|
},
|
|
17610
17613
|
close() {
|
|
17611
17614
|
this.toggleModal();
|
|
@@ -17617,7 +17620,7 @@ const Pi = /* @__PURE__ */ mt(Ad, [["render", Rd], ["__scopeId", "data-v-17c9581
|
|
|
17617
17620
|
let e;
|
|
17618
17621
|
if (!(!n || n.error))
|
|
17619
17622
|
if (e = Object.keys(n.sso), e.length)
|
|
17620
|
-
e.length <= 1 ? (e[0] === "azure" && this.microsoftLogin("sso", n.sso.azure.sso), e[0] === "okta" && this.oktaLogin(n.sso.okta.sso), e[0] === "saml" && this.samlLogin(n.sso.saml.sso.loginUrl)) : (this.forceClose(),
|
|
17623
|
+
e.length <= 1 ? (e[0] === "azure" && this.microsoftLogin("sso", n.sso.azure.sso), e[0] === "okta" && this.oktaLogin(n.sso.okta.sso), e[0] === "saml" && this.samlLogin(n.sso.saml.sso.loginUrl)) : (this.forceClose(), F.$emit("toggleSSOPickModal", {
|
|
17621
17624
|
sso: n.sso,
|
|
17622
17625
|
email: this.email
|
|
17623
17626
|
}));
|
|
@@ -17690,16 +17693,16 @@ const Mi = /* @__PURE__ */ mt(Pd, [["render", Dd], ["__scopeId", "data-v-11f19a0
|
|
|
17690
17693
|
};
|
|
17691
17694
|
},
|
|
17692
17695
|
mounted() {
|
|
17693
|
-
|
|
17696
|
+
F.$on("toggleOTPModal", this.toggleModal), F.$on("closeModal", () => {
|
|
17694
17697
|
this.toggle = !1;
|
|
17695
17698
|
});
|
|
17696
17699
|
},
|
|
17697
17700
|
beforeDestroy() {
|
|
17698
|
-
|
|
17701
|
+
F._events.toggleOTPModal.pop();
|
|
17699
17702
|
},
|
|
17700
17703
|
methods: {
|
|
17701
17704
|
forceClose() {
|
|
17702
|
-
|
|
17705
|
+
F.$emit("closeModal");
|
|
17703
17706
|
},
|
|
17704
17707
|
close() {
|
|
17705
17708
|
this.toggleModal();
|
|
@@ -17707,7 +17710,7 @@ const Mi = /* @__PURE__ */ mt(Pd, [["render", Dd], ["__scopeId", "data-v-11f19a0
|
|
|
17707
17710
|
async submit() {
|
|
17708
17711
|
if (!this.otp || this.otp.length !== 6)
|
|
17709
17712
|
return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);
|
|
17710
|
-
this.loading = !0,
|
|
17713
|
+
this.loading = !0, F.$emit("otpSubmitted", this.otp), F.$emit("toggleOTPModal"), this.loading = !1;
|
|
17711
17714
|
},
|
|
17712
17715
|
toggleModal() {
|
|
17713
17716
|
this.toggle = !this.toggle;
|
|
@@ -17789,16 +17792,16 @@ const Ni = /* @__PURE__ */ mt(Hd, [["render", Zd]]), ep = {
|
|
|
17789
17792
|
};
|
|
17790
17793
|
},
|
|
17791
17794
|
mounted() {
|
|
17792
|
-
|
|
17795
|
+
F.$on("toggleSSOPickModal", this.toggleModal), F.$on("closeModal", () => {
|
|
17793
17796
|
this.toggle = !1;
|
|
17794
17797
|
});
|
|
17795
17798
|
},
|
|
17796
17799
|
beforeDestroy() {
|
|
17797
|
-
|
|
17800
|
+
F._events.toggleSSOPickModal.pop();
|
|
17798
17801
|
},
|
|
17799
17802
|
methods: {
|
|
17800
17803
|
forceClose() {
|
|
17801
|
-
|
|
17804
|
+
F.$emit("closeModal");
|
|
17802
17805
|
},
|
|
17803
17806
|
close() {
|
|
17804
17807
|
this.toggleModal();
|
|
@@ -18020,24 +18023,24 @@ const wp = /* @__PURE__ */ mt(fp, [["render", yp]]), bp = {
|
|
|
18020
18023
|
};
|
|
18021
18024
|
},
|
|
18022
18025
|
async mounted() {
|
|
18023
|
-
|
|
18026
|
+
F.$on("toggleSSOLanguageModal", this.toggleModal), F.$on("closeModal", () => {
|
|
18024
18027
|
this.toggle = !1;
|
|
18025
18028
|
});
|
|
18026
18029
|
let n = this.isNative ? await vr.getLanguageCode() : Dn.getFirstBrowserLanguage();
|
|
18027
18030
|
n && bp.SUPPORTED_LANGUAGES.includes(n) && this.updateLanguage(n);
|
|
18028
18031
|
},
|
|
18029
18032
|
beforeDestroy() {
|
|
18030
|
-
|
|
18033
|
+
F._events.toggleSSOLanguageModal.pop();
|
|
18031
18034
|
},
|
|
18032
18035
|
methods: {
|
|
18033
18036
|
forceClose() {
|
|
18034
|
-
|
|
18037
|
+
F.$emit("closeModal");
|
|
18035
18038
|
},
|
|
18036
18039
|
close() {
|
|
18037
18040
|
this.forceClose();
|
|
18038
18041
|
},
|
|
18039
18042
|
async updateLanguage(n) {
|
|
18040
|
-
this.updateLang(n),
|
|
18043
|
+
this.updateLang(n), F.$emit("closeModal");
|
|
18041
18044
|
},
|
|
18042
18045
|
toggleModal() {
|
|
18043
18046
|
this.toggle = !this.toggle;
|
|
@@ -18331,7 +18334,7 @@ const Pp = { id: "ssoapp" }, Mp = {
|
|
|
18331
18334
|
}
|
|
18332
18335
|
},
|
|
18333
18336
|
async mounted() {
|
|
18334
|
-
this.applyBgStyle(), this.setView(this.viewProp),
|
|
18337
|
+
this.applyBgStyle(), this.setView(this.viewProp), F.$on("ssoEvent", this.ssoOutgoingEvent), F.$on("ssoLogout", (n) => this.logout(n)), F.$on("getLoggedInAccounts", () => this.getLoggedInAccounts()), F.$on("refreshTokenAction", (n) => this.refreshTokenAction({ ...n, storage: this.$storex })), F.$on("switchAccount", (n) => this.switchAccount(n)), F.$on("setToken", (n) => this.setToken(n));
|
|
18335
18338
|
},
|
|
18336
18339
|
methods: {
|
|
18337
18340
|
async init() {
|
|
@@ -18341,13 +18344,13 @@ const Pp = { id: "ssoapp" }, Mp = {
|
|
|
18341
18344
|
this.$emit("ssoEvent", n);
|
|
18342
18345
|
},
|
|
18343
18346
|
ssoIncomingEvent(n) {
|
|
18344
|
-
|
|
18347
|
+
F.$emit(n.name, n.data);
|
|
18345
18348
|
},
|
|
18346
18349
|
applyBgStyle() {
|
|
18347
18350
|
this.display === "redirect" ? document.getElementsByTagName("html")[0].style = "background: #dfeefe;" : document.getElementsByTagName("html")[0].style = "";
|
|
18348
18351
|
},
|
|
18349
18352
|
toggleSSOLanguageModal() {
|
|
18350
|
-
|
|
18353
|
+
F.$emit("toggleSSOLanguageModal", !0);
|
|
18351
18354
|
}
|
|
18352
18355
|
},
|
|
18353
18356
|
watch: {
|
|
@@ -18432,7 +18435,7 @@ const Pp = { id: "ssoapp" }, Mp = {
|
|
|
18432
18435
|
};
|
|
18433
18436
|
export {
|
|
18434
18437
|
at as A,
|
|
18435
|
-
|
|
18438
|
+
F as E,
|
|
18436
18439
|
Gs as Q,
|
|
18437
18440
|
mt as _,
|
|
18438
18441
|
oh as i
|