@tapni/auth 0.0.74 → 0.0.75
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/TapniAuth.es.js +16 -16
- package/dist/TapniAuth.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +1 -0
- package/src/mixins/apple.mixin.js +1 -1
- package/src/mixins/auth.mixin.js +3 -6
- package/src/mixins/facebook.mixin.js +1 -1
- package/src/mixins/google.mixin.js +1 -1
- package/src/mixins/microsoft.mixin.js +1 -1
- package/src/mixins/okta.mixin.js +1 -1
- package/src/mixins/qr-auth.mixin.js +1 -1
- package/src/views/Register.vue +1 -1
- package/src/views/Verify.vue +1 -1
package/dist/TapniAuth.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Capacitor as Qt, registerPlugin as In, WebPlugin as Wo } from "@capacit
|
|
|
8
8
|
import { Browser as hn } from "@capacitor/browser";
|
|
9
9
|
import $o from "qr-code-styling";
|
|
10
10
|
import { sanitizeUrl as Jo } from "@braintree/sanitize-url";
|
|
11
|
-
const Xo = "0.0.
|
|
11
|
+
const Xo = "0.0.75";
|
|
12
12
|
let Un;
|
|
13
13
|
const Ft = {
|
|
14
14
|
setApiRootFromOptions(n) {
|
|
@@ -4490,7 +4490,7 @@ const ze = {
|
|
|
4490
4490
|
if (e)
|
|
4491
4491
|
return this.errorHandler(e);
|
|
4492
4492
|
if (t.data.success)
|
|
4493
|
-
return this.display === "npm" && (this.loginSetup({ ...t, isModal: n.isModal }), this.getLoggedInAccounts()), this.loginSuccess({ ...t, isModal: n.isModal }), !0;
|
|
4493
|
+
return this.display === "npm" && (this.loginSetup({ ...t, isModal: n.isModal }), await this.getLoggedInAccounts()), this.loginSuccess({ ...t, isModal: n.isModal }), !0;
|
|
4494
4494
|
},
|
|
4495
4495
|
loginSuccess(n) {
|
|
4496
4496
|
if (this.display === "redirect") {
|
|
@@ -4506,7 +4506,7 @@ const ze = {
|
|
|
4506
4506
|
{ code: n.data.auth_code, state: this.$route.query.state },
|
|
4507
4507
|
e
|
|
4508
4508
|
);
|
|
4509
|
-
}) : this.display === "npm" && (z.$emit("ssoEvent", { name: "setLoading", data: !0 }), z.$emit("ssoEvent", { name: "getUser", data: { login: !0, username: n.data.data.username } }), n.isModal && (z.$emit("closeModal"), this.successSnack(this.ssoLang[this.appLanguage].success_login)), this.$router.push("/" + n.data.data.username + "#edit"));
|
|
4509
|
+
}) : this.display === "npm" && (z.$emit("ssoEvent", { name: "setLoading", data: !0 }), z.$emit("ssoEvent", { name: "setStorage", data: this.$storage }), z.$emit("ssoEvent", { name: "getUser", data: { login: !0, username: n.data.data.username } }), n.isModal && (z.$emit("closeModal"), this.successSnack(this.ssoLang[this.appLanguage].success_login)), this.$router.push("/" + n.data.data.username + "#edit"));
|
|
4510
4510
|
},
|
|
4511
4511
|
async register(n) {
|
|
4512
4512
|
const [e, t] = await Z(
|
|
@@ -4630,10 +4630,10 @@ const ze = {
|
|
|
4630
4630
|
},
|
|
4631
4631
|
setRefreshToken(n) {
|
|
4632
4632
|
let e = this.getRefreshTokens();
|
|
4633
|
-
n ? (e.includes(n) || e.unshift(n), this.refreshToken = n) : (e = e.filter((t) => t !== this.refreshToken), e && e.length >= 1 && (this.refreshToken = e[0])), this.$storage.refreshTokens = e.join(",")
|
|
4633
|
+
n ? (e.includes(n) || e.unshift(n), this.refreshToken = n) : (e = e.filter((t) => t !== this.refreshToken), e && e.length >= 1 && (this.refreshToken = e[0])), this.$storage.refreshTokens = e.join(",");
|
|
4634
4634
|
},
|
|
4635
4635
|
setToken(n) {
|
|
4636
|
-
this.$storage.token = n, this.token = n
|
|
4636
|
+
this.$storage.token = n, this.token = n;
|
|
4637
4637
|
},
|
|
4638
4638
|
setUserID(n) {
|
|
4639
4639
|
this.$storage.UserId = n;
|
|
@@ -4759,7 +4759,7 @@ const Jr = /* @__PURE__ */ We(ni, [["render", mi], ["__scopeId", "data-v-c4cf0a5
|
|
|
4759
4759
|
if (o.data.success) {
|
|
4760
4760
|
if (this.display === "popup")
|
|
4761
4761
|
return (t = window.parent) == null ? void 0 : t.postMessage({ code: o.data.auth_code, state: this.$route.query.state }, "*");
|
|
4762
|
-
await this.loginSetup(o), this.getLoggedInAccounts(), this.loginSuccess({ ...o, isModal: this.isModal }), setTimeout(() => {
|
|
4762
|
+
await this.loginSetup(o), await this.getLoggedInAccounts(), this.loginSuccess({ ...o, isModal: this.isModal }), setTimeout(() => {
|
|
4763
4763
|
this.googleLoad = !1;
|
|
4764
4764
|
}, 1e3);
|
|
4765
4765
|
} else
|
|
@@ -4814,7 +4814,7 @@ const Zr = {
|
|
|
4814
4814
|
if (i.data.success) {
|
|
4815
4815
|
if (this.display === "popup")
|
|
4816
4816
|
return (r = window.parent) == null ? void 0 : r.postMessage({ code: i.data.auth_code, state: this.$route.query.state }, "*");
|
|
4817
|
-
await this.loginSetup(i), this.getLoggedInAccounts(), this.$router.push("/" + i.data.data.username + "#edit"), setTimeout(() => {
|
|
4817
|
+
await this.loginSetup(i), await this.getLoggedInAccounts(), this.$router.push("/" + i.data.data.username + "#edit"), setTimeout(() => {
|
|
4818
4818
|
this.facebookLoad = !1, z.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
4819
4819
|
}, 1e3);
|
|
4820
4820
|
} else
|
|
@@ -4856,7 +4856,7 @@ const Zr = {
|
|
|
4856
4856
|
if (o.data.success) {
|
|
4857
4857
|
if (this.display === "popup")
|
|
4858
4858
|
return (t = window.parent) == null ? void 0 : t.postMessage({ code: o.data.auth_code, state: this.$route.query.state }, "*");
|
|
4859
|
-
await this.loginSetup(o), this.getLoggedInAccounts(), this.loginSuccess({ ...o, isModal: this.isModal }), setTimeout(() => {
|
|
4859
|
+
await this.loginSetup(o), await this.getLoggedInAccounts(), this.loginSuccess({ ...o, isModal: this.isModal }), setTimeout(() => {
|
|
4860
4860
|
this.appleLoad = !1;
|
|
4861
4861
|
}, 1e3);
|
|
4862
4862
|
} else
|
|
@@ -13694,7 +13694,7 @@ const An = {
|
|
|
13694
13694
|
{ code: u.data.auth_code, state: this.$route.query.state },
|
|
13695
13695
|
"*"
|
|
13696
13696
|
);
|
|
13697
|
-
await this.loginSetup(u), this.getLoggedInAccounts(), this.loginSuccess({ ...u, isModal: this.isModal }), setTimeout(() => {
|
|
13697
|
+
await this.loginSetup(u), await this.getLoggedInAccounts(), this.loginSuccess({ ...u, isModal: this.isModal }), setTimeout(() => {
|
|
13698
13698
|
this.microsoftLoad = !1, this.microsoftSSOLoad = !1;
|
|
13699
13699
|
}, 1e3);
|
|
13700
13700
|
} else
|
|
@@ -13820,7 +13820,7 @@ const An = {
|
|
|
13820
13820
|
if (t.data.success) {
|
|
13821
13821
|
if (this.display === "popup")
|
|
13822
13822
|
return (i = window.parent) == null ? void 0 : i.postMessage({ code: t.data.auth_code, state: this.$route.query.state }, "*");
|
|
13823
|
-
await this.loginSetup(t), this.getLoggedInAccounts(), this.$router.push("/" + t.data.data.username + "#edit"), setTimeout(() => {
|
|
13823
|
+
await this.loginSetup(t), await this.getLoggedInAccounts(), this.$router.push("/" + t.data.data.username + "#edit"), setTimeout(() => {
|
|
13824
13824
|
this.appleLoad = !1, z.$emit("ssoEvent", { name: "setLoading", data: !1 });
|
|
13825
13825
|
}, 1e3);
|
|
13826
13826
|
} else
|
|
@@ -15016,7 +15016,7 @@ const La = fo.Buffer, Mn = {
|
|
|
15016
15016
|
}, this.$storage));
|
|
15017
15017
|
if (n)
|
|
15018
15018
|
return this.errorHandler(n);
|
|
15019
|
-
e.data.auth_code && (this.display === "npm" && (this.loginSetup({ ...e, isModal: this.isModal }), this.getLoggedInAccounts()), this.loginSuccess({ ...e, isModal: this.isModal }), clearInterval(this.poolingInterval), clearInterval(this.qrCodeRefreshInterval));
|
|
15019
|
+
e.data.auth_code && (this.display === "npm" && (this.loginSetup({ ...e, isModal: this.isModal }), await this.getLoggedInAccounts()), this.loginSuccess({ ...e, isModal: this.isModal }), clearInterval(this.poolingInterval), clearInterval(this.qrCodeRefreshInterval));
|
|
15020
15020
|
}, 2e3);
|
|
15021
15021
|
},
|
|
15022
15022
|
async initQrCodeLogin() {
|
|
@@ -15399,7 +15399,7 @@ const _o = /* @__PURE__ */ We(za, [["render", Ps]]), Ms = {
|
|
|
15399
15399
|
captchaToken: await this.getCaptchaToken("account_verify"),
|
|
15400
15400
|
ref: this.referral
|
|
15401
15401
|
}, e = await this.register(n);
|
|
15402
|
-
this.submitted = !1, e.data && e.data.success && (e.data.message === "SUCCESS_REGISTER" ? (this.isModal ? z.$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 === "npm" && (await this.loginSetup({ ...e, isModal: n.isModal }), this.getLoggedInAccounts()), await this.loginSuccess({ ...e, isModal: n.isModal })));
|
|
15402
|
+
this.submitted = !1, e.data && e.data.success && (e.data.message === "SUCCESS_REGISTER" ? (this.isModal ? z.$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 === "npm" && (await this.loginSetup({ ...e, isModal: n.isModal }), await this.getLoggedInAccounts()), await this.loginSuccess({ ...e, isModal: n.isModal })));
|
|
15403
15403
|
},
|
|
15404
15404
|
close() {
|
|
15405
15405
|
z.$emit("ssoEvent", { name: "toggleAddAccountModal", data: !0 });
|
|
@@ -15685,7 +15685,7 @@ const vo = /* @__PURE__ */ We(Ms, [["render", Cc]]), Ec = {
|
|
|
15685
15685
|
return !1;
|
|
15686
15686
|
this.submitted = !0;
|
|
15687
15687
|
let e = await this.verify(n);
|
|
15688
|
-
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 = "", z.$emit("closeModal")), await this.loginSetup(e), this.getLoggedInAccounts(), this.$storage.verifyEmail = "", this.$router.push("/" + e.data.data.username + "#edit"), this.successSnack(this.ssoLang[this.appLanguage].verify_account_success2))) : this.submitted = !1;
|
|
15688
|
+
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 = "", z.$emit("closeModal")), await this.loginSetup(e), await this.getLoggedInAccounts(), this.$storage.verifyEmail = "", this.$router.push("/" + e.data.data.username + "#edit"), this.successSnack(this.ssoLang[this.appLanguage].verify_account_success2))) : this.submitted = !1;
|
|
15689
15689
|
},
|
|
15690
15690
|
registerAccountModal() {
|
|
15691
15691
|
z.$emit("ssoEvent", { name: "toggleAddAccountModalRegister", data: !1 });
|
|
@@ -15708,7 +15708,7 @@ const vo = /* @__PURE__ */ We(Ms, [["render", Cc]]), Ec = {
|
|
|
15708
15708
|
deep: !0
|
|
15709
15709
|
}
|
|
15710
15710
|
}
|
|
15711
|
-
}, Ge = (n) => (Ht("data-v-
|
|
15711
|
+
}, Ge = (n) => (Ht("data-v-75db7f02"), n = n(), qt(), n), Tc = /* @__PURE__ */ Ge(() => /* @__PURE__ */ y("i", { class: "font-17 color-black" }, [
|
|
15712
15712
|
/* @__PURE__ */ y("img", {
|
|
15713
15713
|
src: "https://cdn.tapni.co/icons/down-arrow.png",
|
|
15714
15714
|
class: "responsive-image",
|
|
@@ -15834,7 +15834,7 @@ function $c(n, e, t, r, o, i) {
|
|
|
15834
15834
|
]))
|
|
15835
15835
|
], 36);
|
|
15836
15836
|
}
|
|
15837
|
-
const yo = /* @__PURE__ */ We(Ec, [["render", $c], ["__scopeId", "data-v-
|
|
15837
|
+
const yo = /* @__PURE__ */ We(Ec, [["render", $c], ["__scopeId", "data-v-75db7f02"]]), Jc = {
|
|
15838
15838
|
name: "AuthReset",
|
|
15839
15839
|
mixins: [ze],
|
|
15840
15840
|
data() {
|
|
@@ -16654,7 +16654,7 @@ const Su = { id: "ssoapp" }, Au = {
|
|
|
16654
16654
|
return;
|
|
16655
16655
|
this.isSetup = !0, this.setToken(this.$storage.token);
|
|
16656
16656
|
const n = this.getRefreshTokens();
|
|
16657
|
-
this.setRefreshToken(n[0]), await this.getLoggedInAccounts(), this.$emit("ssoLibraryReady");
|
|
16657
|
+
this.setRefreshToken(n[0]), await this.getLoggedInAccounts(), this.setStorage(), this.$emit("ssoLibraryReady");
|
|
16658
16658
|
},
|
|
16659
16659
|
ssoOutgoingEvent(n) {
|
|
16660
16660
|
this.$emit("ssoEvent", n);
|