@tapni/auth 0.0.163 → 0.0.164
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-rIITKRRa.js → Account--TEqAldR.js} +1 -1
- package/dist/{QR-CyFd5BF-.js → QR-BfLf5wTV.js} +1 -1
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +3 -3
- package/dist/{install-ZmqL5ixy.js → install-1sbk1vxS.js} +10 -7
- package/package.json +4 -2
- package/src/main.js +4 -0
- package/src/mixins/global.mixin.js +1 -1
- package/src/mixins/qr-auth.mixin.js +1 -1
- package/src/store/auth.js +3 -3
- package/src/views/Register.vue +1 -1
|
@@ -1195,7 +1195,7 @@ Li(q);
|
|
|
1195
1195
|
const aa = {
|
|
1196
1196
|
computed: {
|
|
1197
1197
|
home() {
|
|
1198
|
-
return this.$storex && this.$storex.token && this.$storex.username ? "/" + this.$storex.username
|
|
1198
|
+
return this.$storex && this.$storex.token && this.$storex.username ? "/" + this.$storex.username : "/welcome";
|
|
1199
1199
|
},
|
|
1200
1200
|
isAndroid() {
|
|
1201
1201
|
return /Android/i.test(navigator.userAgent) || Yn.getPlatform() === "android";
|
|
@@ -1412,7 +1412,7 @@ function ka(n, e, t, r, o, i) {
|
|
|
1412
1412
|
const po = /* @__PURE__ */ mt(ua, [["render", ka], ["__scopeId", "data-v-615ed484"]]), Ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1413
1413
|
__proto__: null,
|
|
1414
1414
|
default: po
|
|
1415
|
-
}, Symbol.toStringTag, { value: "Module" })), Ea = "0.0.
|
|
1415
|
+
}, Symbol.toStringTag, { value: "Module" })), Ea = "0.0.164", hr = {
|
|
1416
1416
|
getMe() {
|
|
1417
1417
|
return ce().get("/users/me");
|
|
1418
1418
|
},
|
|
@@ -5553,7 +5553,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5553
5553
|
choose_other_login_methods: "다른 로그인 방법 선택하기",
|
|
5554
5554
|
no_sso_logins: "귀하의 회사는 SSO 로그인을 사용하지 않습니다. 관리자에게 문의하십시오."
|
|
5555
5555
|
}
|
|
5556
|
-
}, Ao = () => Promise.resolve().then(() => Ca), Sa = () => Promise.resolve().then(() => qc), Ia = () => Promise.resolve().then(() => Ul), Aa = () => Promise.resolve().then(() => wd), Ra = () => import("./Account
|
|
5556
|
+
}, Ao = () => Promise.resolve().then(() => Ca), Sa = () => Promise.resolve().then(() => qc), Ia = () => Promise.resolve().then(() => Ul), Aa = () => Promise.resolve().then(() => wd), Ra = () => import("./Account--TEqAldR.js"), Pa = () => Promise.resolve().then(() => du), Ma = () => Promise.resolve().then(() => Id), Na = () => import("./QR-BfLf5wTV.js"), Oa = () => Promise.resolve().then(() => xu), La = [
|
|
5557
5557
|
{
|
|
5558
5558
|
path: "/welcome",
|
|
5559
5559
|
name: "AuthWelcome",
|
|
@@ -5819,7 +5819,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5819
5819
|
if (o)
|
|
5820
5820
|
return t("errorHandler", o);
|
|
5821
5821
|
if (i.data.success)
|
|
5822
|
-
return e.display
|
|
5822
|
+
return e.display !== "popup" && (t("loginSetup", { ...i, isModal: r.isModal }), await t("getLoggedInAccounts")), t("loginSuccess", { ...i, isModal: r.isModal }), !0;
|
|
5823
5823
|
},
|
|
5824
5824
|
loginSuccess({ commit: n, state: e, dispatch: t, getters: r }, o) {
|
|
5825
5825
|
if (e.display === "redirect")
|
|
@@ -5994,7 +5994,10 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5994
5994
|
},
|
|
5995
5995
|
getters: {
|
|
5996
5996
|
isLoggedIn: (n) => !!n.$storex.token && n.$storex.token !== "" && n.$storex.token !== "null",
|
|
5997
|
-
renderView: (n) =>
|
|
5997
|
+
renderView: (n, e, t) => {
|
|
5998
|
+
var r;
|
|
5999
|
+
return n.display !== "npm" ? (r = t.route) == null ? void 0 : r.name : n.view;
|
|
6000
|
+
},
|
|
5998
6001
|
appRealm: (n) => n.realm,
|
|
5999
6002
|
appLanguage: (n) => n.lang,
|
|
6000
6003
|
accessToken: (n) => n.$storex.token,
|
|
@@ -16301,7 +16304,7 @@ const Ai = {
|
|
|
16301
16304
|
}, this.$storex));
|
|
16302
16305
|
if (n)
|
|
16303
16306
|
return this.errorHandler(n);
|
|
16304
|
-
e.data.auth_code && (this.display
|
|
16307
|
+
e.data.auth_code && (this.display !== "popup" && (this.loginSetup({ ...e, isModal: this.isModal }), await this.getLoggedInAccounts()), this.loginSuccess({ ...e, isModal: this.isModal }), clearInterval(this.poolingInterval), clearInterval(this.qrCodeRefreshInterval));
|
|
16305
16308
|
}, 2e3);
|
|
16306
16309
|
},
|
|
16307
16310
|
async initQrCodeLogin() {
|
|
@@ -16698,7 +16701,7 @@ const wo = /* @__PURE__ */ mt(Vs, [["render", Fc]]), qc = /* @__PURE__ */ Object
|
|
|
16698
16701
|
captchaToken: await this.getCaptchaToken("account_verify"),
|
|
16699
16702
|
ref: this.referral
|
|
16700
16703
|
}, e = await this.register(n);
|
|
16701
|
-
this.submitted = !1, e.data && e.data.success && (e.data.message === "SUCCESS_REGISTER" ? (this.isModal ? q.$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
|
|
16704
|
+
this.submitted = !1, e.data && e.data.success && (e.data.message === "SUCCESS_REGISTER" ? (this.isModal ? q.$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 })));
|
|
16702
16705
|
},
|
|
16703
16706
|
close() {
|
|
16704
16707
|
q.$emit("ssoEvent", { name: "toggleAddAccountModal", data: !0 });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapni/auth",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.164",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/TapniAuth.umd.js",
|
|
6
6
|
"module": "./dist/TapniAuth.es.js",
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
"vue": "^3.3.11",
|
|
44
44
|
"vue-cookies": "^1.8.3",
|
|
45
45
|
"vue-router": "^4.2.5",
|
|
46
|
-
"vuex": "^4.0.2"
|
|
46
|
+
"vuex": "^4.0.2",
|
|
47
|
+
"vuex-router-sync": "v6.0.0-rc.1"
|
|
48
|
+
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
51
|
"@rollup/plugin-inject": "^5.0.5",
|
package/src/main.js
CHANGED
|
@@ -6,11 +6,15 @@ import VueCookies from 'vue-cookies'
|
|
|
6
6
|
import { App } from '@capacitor/app';
|
|
7
7
|
import { Browser } from '@capacitor/browser';
|
|
8
8
|
import store from './store/store.js';
|
|
9
|
+
import { sync } from 'vuex-router-sync';
|
|
9
10
|
|
|
10
11
|
const app = createApp(RootApp)
|
|
11
12
|
|
|
12
13
|
app.config.productionTip = false
|
|
13
14
|
|
|
15
|
+
// Vuex Router Sync
|
|
16
|
+
sync(store, router);
|
|
17
|
+
|
|
14
18
|
// Cookies
|
|
15
19
|
app.use(VueCookies)
|
|
16
20
|
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
computed: {
|
|
5
5
|
home() {
|
|
6
6
|
if (this.$storex && this.$storex.token && this.$storex.username) {
|
|
7
|
-
if (import.meta.env.VITE_APP_MODE === 'npm') return '/' + this.$storex.username
|
|
7
|
+
if (import.meta.env.VITE_APP_MODE === 'npm') return '/' + this.$storex.username
|
|
8
8
|
if (import.meta.env.VITE_APP_MODE === 'redirect') return '/account'
|
|
9
9
|
} else return '/welcome'
|
|
10
10
|
},
|
|
@@ -93,7 +93,7 @@ export default {
|
|
|
93
93
|
}, this.$storex));
|
|
94
94
|
if (err) return this.errorHandler(err);
|
|
95
95
|
if (response.data.auth_code) {
|
|
96
|
-
if (this.display
|
|
96
|
+
if (this.display !== 'popup') {
|
|
97
97
|
this.loginSetup({ ...response, isModal: this.isModal });
|
|
98
98
|
await this.getLoggedInAccounts();
|
|
99
99
|
}
|
package/src/store/auth.js
CHANGED
|
@@ -292,7 +292,7 @@ export default {
|
|
|
292
292
|
const [err, response] = await to(AuthService.login(data));
|
|
293
293
|
if (err) return dispatch('errorHandler', err);
|
|
294
294
|
if (response.data.success) {
|
|
295
|
-
if (state.display
|
|
295
|
+
if (state.display !== 'popup') {
|
|
296
296
|
dispatch('loginSetup', { ...response, isModal: data.isModal });
|
|
297
297
|
await dispatch('getLoggedInAccounts');
|
|
298
298
|
}
|
|
@@ -546,9 +546,9 @@ export default {
|
|
|
546
546
|
isLoggedIn: state => {
|
|
547
547
|
return !!state.$storex.token && state.$storex.token !== "" && state.$storex.token !== "null";
|
|
548
548
|
},
|
|
549
|
-
renderView: state => {
|
|
549
|
+
renderView: (state, getters, rootState) => {
|
|
550
550
|
if (state.display !== "npm") {
|
|
551
|
-
|
|
551
|
+
return rootState.route?.name;
|
|
552
552
|
} else return state.view;
|
|
553
553
|
},
|
|
554
554
|
appRealm: state => {
|
package/src/views/Register.vue
CHANGED
|
@@ -190,7 +190,7 @@ export default {
|
|
|
190
190
|
this.successSnack(this.ssoLang[this.appLanguage].register_success);
|
|
191
191
|
this.formButtonText = this.ssoLang[this.appLanguage].check_your_inbox
|
|
192
192
|
} else if (response.data.message === 'SUCCESS_LOGIN') {
|
|
193
|
-
if (this.display
|
|
193
|
+
if (this.display !== 'popup') {
|
|
194
194
|
await this.loginSetup({ ...response, isModal: data.isModal });
|
|
195
195
|
await this.getLoggedInAccounts();
|
|
196
196
|
}
|