@tapni/auth 0.0.154 → 0.0.156
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-EbkgWYVI.js → Account-gL0FSIxc.js} +29 -29
- package/dist/{QR-ixD0egiZ.js → QR-SuxiYcMd.js} +1 -1
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +3 -3
- package/dist/{install-MI-clcJx.js → install-HnJgkMHx.js} +14 -19
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/src/App.vue +3 -7
- package/src/mixins/auth.mixin.js +2 -0
- package/src/store/auth.js +3 -7
- package/src/views/Account.vue +3 -3
|
@@ -1276,6 +1276,8 @@ const aa = {
|
|
|
1276
1276
|
"allowedOriginsAuth"
|
|
1277
1277
|
]),
|
|
1278
1278
|
...la([
|
|
1279
|
+
"accessToken",
|
|
1280
|
+
"refreshTokens",
|
|
1279
1281
|
"isLoggedIn",
|
|
1280
1282
|
"renderView",
|
|
1281
1283
|
"appLanguage"
|
|
@@ -1407,7 +1409,7 @@ function ka(n, e, t, r, o, i) {
|
|
|
1407
1409
|
const po = /* @__PURE__ */ mt(ua, [["render", ka], ["__scopeId", "data-v-615ed484"]]), Ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1408
1410
|
__proto__: null,
|
|
1409
1411
|
default: po
|
|
1410
|
-
}, Symbol.toStringTag, { value: "Module" })), Ea = "0.0.
|
|
1412
|
+
}, Symbol.toStringTag, { value: "Module" })), Ea = "0.0.156", hr = {
|
|
1411
1413
|
getMe() {
|
|
1412
1414
|
return ce().get("/users/me");
|
|
1413
1415
|
},
|
|
@@ -5548,7 +5550,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5548
5550
|
choose_other_login_methods: "다른 로그인 방법 선택하기",
|
|
5549
5551
|
no_sso_logins: "귀하의 회사는 SSO 로그인을 사용하지 않습니다. 관리자에게 문의하십시오."
|
|
5550
5552
|
}
|
|
5551
|
-
}, Ao = () => Promise.resolve().then(() => Ca), Sa = () => Promise.resolve().then(() => qc), Ia = () => Promise.resolve().then(() => Ul), Aa = () => Promise.resolve().then(() => wd), Ra = () => import("./Account-
|
|
5553
|
+
}, Ao = () => Promise.resolve().then(() => Ca), Sa = () => Promise.resolve().then(() => qc), Ia = () => Promise.resolve().then(() => Ul), Aa = () => Promise.resolve().then(() => wd), Ra = () => import("./Account-gL0FSIxc.js"), Pa = () => Promise.resolve().then(() => du), Ma = () => Promise.resolve().then(() => Id), Na = () => import("./QR-SuxiYcMd.js"), Oa = () => Promise.resolve().then(() => xu), La = [
|
|
5552
5554
|
{
|
|
5553
5555
|
path: "/welcome",
|
|
5554
5556
|
name: "AuthWelcome",
|
|
@@ -5925,14 +5927,14 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5925
5927
|
if (o.data.success)
|
|
5926
5928
|
return o.data;
|
|
5927
5929
|
},
|
|
5928
|
-
async getLoggedInAccounts({
|
|
5929
|
-
if (
|
|
5930
|
-
const [
|
|
5931
|
-
$e.getLoggedInAccounts({ refreshTokens:
|
|
5930
|
+
async getLoggedInAccounts({ getters: n, dispatch: e }) {
|
|
5931
|
+
if (n.refreshTokens && n.refreshTokens.length >= 1) {
|
|
5932
|
+
const [t, r] = await fe(
|
|
5933
|
+
$e.getLoggedInAccounts({ refreshTokens: n.refreshTokens })
|
|
5932
5934
|
);
|
|
5933
|
-
if (
|
|
5934
|
-
return
|
|
5935
|
-
|
|
5935
|
+
if (t)
|
|
5936
|
+
return e("errorHandler", t);
|
|
5937
|
+
r && r.data && r.data.success && e("setLoggedInAccounts", r.data.accounts);
|
|
5936
5938
|
}
|
|
5937
5939
|
},
|
|
5938
5940
|
async loginUsingQR({ commit: n, dispatch: e }, t) {
|
|
@@ -5947,9 +5949,6 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5947
5949
|
setLoggedInUserId({ commit: n }, e) {
|
|
5948
5950
|
n("setLoggedInUserId", e);
|
|
5949
5951
|
},
|
|
5950
|
-
getRefreshTokens({ state: n }) {
|
|
5951
|
-
return n.$storex && n.$storex.refreshTokens ? n.$storex.refreshTokens.split(",") : [];
|
|
5952
|
-
},
|
|
5953
5952
|
setRefreshToken({ commit: n }, e) {
|
|
5954
5953
|
n("setRefreshToken", e);
|
|
5955
5954
|
},
|
|
@@ -5987,7 +5986,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
5987
5986
|
},
|
|
5988
5987
|
getters: {
|
|
5989
5988
|
isLoggedIn: (n) => !!n.$storex.token && n.$storex.token !== "" && n.$storex.token !== "null",
|
|
5990
|
-
renderView: (n) => n.display
|
|
5989
|
+
renderView: (n) => n.display !== "npm" ? "" : n.view,
|
|
5991
5990
|
appRealm: (n) => n.realm,
|
|
5992
5991
|
appLanguage: (n) => n.lang,
|
|
5993
5992
|
accessToken: (n) => n.$storex.token,
|
|
@@ -18325,15 +18324,11 @@ const Pp = { id: "ssoapp" }, Mp = {
|
|
|
18325
18324
|
}
|
|
18326
18325
|
},
|
|
18327
18326
|
async mounted() {
|
|
18328
|
-
this.applyBgStyle(), this.setView(this.viewProp), q.$on("ssoEvent", this.ssoOutgoingEvent), q.$on("ssoLogout", (n) => this.logout(n
|
|
18327
|
+
this.applyBgStyle(), this.setView(this.viewProp), q.$on("ssoEvent", this.ssoOutgoingEvent), q.$on("ssoLogout", (n) => this.logout(n)), q.$on("getLoggedInAccounts", () => this.getLoggedInAccounts()), q.$on("refreshTokenAction", (n) => this.refreshTokenAction({ ...n, storage: this.$storex })), q.$on("switchAccount", (n) => this.switchAccount(n)), q.$on("setToken", (n) => this.setToken(n));
|
|
18329
18328
|
},
|
|
18330
18329
|
methods: {
|
|
18331
18330
|
async init() {
|
|
18332
|
-
|
|
18333
|
-
return;
|
|
18334
|
-
this.isSetup = !0, this.setToken(this.$storex.token);
|
|
18335
|
-
const n = this.getRefreshTokens();
|
|
18336
|
-
this.setRefreshToken(n[0]), await this.getLoggedInAccounts(), this.$emit("ssoLibraryReady", this.$storex);
|
|
18331
|
+
this.$store.commit("auth/setApiRoot", this.$apiRoot || $i.env.VUE_APP_API_ROOT), this.setStorage(this.strg), !this.isSetup && (this.isSetup = !0, await this.getLoggedInAccounts(), this.$emit("ssoLibraryReady", this.$storex));
|
|
18337
18332
|
},
|
|
18338
18333
|
ssoOutgoingEvent(n) {
|
|
18339
18334
|
this.$emit("ssoEvent", n);
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.app-store-icon[data-v-615ed484]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-89d98ef3],#emailInput[data-v-89d98ef3],#emailInput[data-v-69a9cfa3]{text-align:center;padding-right:15%;font-size:17px}.fade-enter-to[data-v-17c95816]{opacity:1}.sso-img[data-v-11f19a09]{margin:2px auto 0;width:35px}input[data-v-11f19a09]{margin:0 auto;height:25px}.sso-img[data-v-4f821f65]{margin:2px auto 0;width:35px}input[data-v-4f821f65]{margin:0 auto;height:25px}.link-grid,.user-link-img{width:100%;display:inline-table;position:relative}.link-grid{width:30%;margin:1.6%;padding:1.6%}.link-grid .user-link-img img{border-radius:25%!important}.link-grid .edit-icon{border-radius:20px;right:-3%;top:-3%;position:absolute;z-index:3;max-width:23%;overflow:hidden;min-width:30px}.link-grid .direct-icon{border-radius:20px;left:-3%;top:-3%;position:absolute;z-index:555;max-width:23%;overflow:hidden;min-width:30px}.link-grid .link-text{min-height:20px;margin-top:3px!important;display:block;text-align:center;line-height:normal;overflow-wrap:anywhere}.link-list{width:93%;max-height:67px!important;margin:0 auto;display:flex;border-radius:15px!important;background-color:#fff;border:solid 1px #e8e8e8;position:relative;align-items:center}.link-list .user-link-img{display:inline-block;width:65px;border-radius:25%!important}.link-list .link-text{display:inline-block;padding:18px 0% 17px 10%;font-size:15px;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;text-align:left;border-radius:15px!important}.link-list .edit-icon{border-radius:20px;right:7%;top:30%;position:absolute;z-index:3;width:26px;overflow:hidden}.link-list .switching{width:45px}.link-list .direct-icon{border-radius:20px;left:-2%;top:-13%;position:absolute;z-index:555;width:26px;overflow:hidden}.small{width:22%!important;margin:2% 4% 0%;padding:0%}.small .link-text{margin-top:0!important;font-size:13px}.linkExternal{margin-right:20px;width:20px;display:inline-block!important;height:20px;background:#000;-webkit-mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;transform:scale(1.5)}.user-img[data-v-a49a90e5]{margin:2px auto 0;width:65px}input[data-v-a49a90e5]{margin:0 auto;height:25px}html *{font-family:Inter,sans-serif}#bodyId{padding-top:3%;max-width:667px!important;margin:1.5% auto auto;height:95%!important;border-radius:20px}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.smartbanner-ios{background:linear-gradient(to bottom,#f4f4f4,#f4f4f4);box-shadow:0 0 #fff;border-bottom:1px solid #dddddd}.smartbanner-icon{border-radius:16px}.smartbanner-ios .smartbanner-button{font-size:13px;padding:9px 0;height:40px;border-radius:13px;background:#f4f4f4;color:#0a99d2;border:none;box-shadow:none;text-transform:uppercase}.snack-body{display:none;border-radius:40px;font-size:15px!important}#errorSnack{background-color:#fee3e3!important;border:2px solid #edd9d9!important;color:#000}#successSnack{background-color:#eff5eb!important;border:2px solid #e3ecd7!important;color:#000}.grecaptcha-badge{visibility:hidden}.header-logo{position:absolute;left:50%;transform:translate(-50%,-50%);margin-top:0;z-index:2}.header-logo-img{height:40px;margin-top:10px}.container[data-v-
|
|
1
|
+
.app-store-icon[data-v-615ed484]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-89d98ef3],#emailInput[data-v-89d98ef3],#emailInput[data-v-69a9cfa3]{text-align:center;padding-right:15%;font-size:17px}.fade-enter-to[data-v-17c95816]{opacity:1}.sso-img[data-v-11f19a09]{margin:2px auto 0;width:35px}input[data-v-11f19a09]{margin:0 auto;height:25px}.sso-img[data-v-4f821f65]{margin:2px auto 0;width:35px}input[data-v-4f821f65]{margin:0 auto;height:25px}.link-grid,.user-link-img{width:100%;display:inline-table;position:relative}.link-grid{width:30%;margin:1.6%;padding:1.6%}.link-grid .user-link-img img{border-radius:25%!important}.link-grid .edit-icon{border-radius:20px;right:-3%;top:-3%;position:absolute;z-index:3;max-width:23%;overflow:hidden;min-width:30px}.link-grid .direct-icon{border-radius:20px;left:-3%;top:-3%;position:absolute;z-index:555;max-width:23%;overflow:hidden;min-width:30px}.link-grid .link-text{min-height:20px;margin-top:3px!important;display:block;text-align:center;line-height:normal;overflow-wrap:anywhere}.link-list{width:93%;max-height:67px!important;margin:0 auto;display:flex;border-radius:15px!important;background-color:#fff;border:solid 1px #e8e8e8;position:relative;align-items:center}.link-list .user-link-img{display:inline-block;width:65px;border-radius:25%!important}.link-list .link-text{display:inline-block;padding:18px 0% 17px 10%;font-size:15px;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;text-align:left;border-radius:15px!important}.link-list .edit-icon{border-radius:20px;right:7%;top:30%;position:absolute;z-index:3;width:26px;overflow:hidden}.link-list .switching{width:45px}.link-list .direct-icon{border-radius:20px;left:-2%;top:-13%;position:absolute;z-index:555;width:26px;overflow:hidden}.small{width:22%!important;margin:2% 4% 0%;padding:0%}.small .link-text{margin-top:0!important;font-size:13px}.linkExternal{margin-right:20px;width:20px;display:inline-block!important;height:20px;background:#000;-webkit-mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;transform:scale(1.5)}.user-img[data-v-a49a90e5]{margin:2px auto 0;width:65px}input[data-v-a49a90e5]{margin:0 auto;height:25px}html *{font-family:Inter,sans-serif}#bodyId{padding-top:3%;max-width:667px!important;margin:1.5% auto auto;height:95%!important;border-radius:20px}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.smartbanner-ios{background:linear-gradient(to bottom,#f4f4f4,#f4f4f4);box-shadow:0 0 #fff;border-bottom:1px solid #dddddd}.smartbanner-icon{border-radius:16px}.smartbanner-ios .smartbanner-button{font-size:13px;padding:9px 0;height:40px;border-radius:13px;background:#f4f4f4;color:#0a99d2;border:none;box-shadow:none;text-transform:uppercase}.snack-body{display:none;border-radius:40px;font-size:15px!important}#errorSnack{background-color:#fee3e3!important;border:2px solid #edd9d9!important;color:#000}#successSnack{background-color:#eff5eb!important;border:2px solid #e3ecd7!important;color:#000}.grecaptcha-badge{visibility:hidden}.header-logo{position:absolute;left:50%;transform:translate(-50%,-50%);margin-top:0;z-index:2}.header-logo-img{height:40px;margin-top:10px}.container[data-v-f536b602]{padding:20px 20px 100px!important;display:flex;flex-direction:column;gap:20px}.settingsCard[data-v-f536b602]{background-color:#fff;padding:20px;border-radius:26px;align-items:center}.device[data-v-f536b602]{display:flex;align-items:center}h4[data-v-f536b602]{margin-left:20px;font-weight:700}.middle[data-v-f536b602]{flex:1}.left img[data-v-f536b602]{background-color:#f7f8f9;border-radius:20px;padding:10px}.divider[data-v-f536b602]{height:1px;background-color:#f0f0f0;margin:20px 0}.moreFooter[data-v-f536b602]{display:flex;align-items:center;justify-content:space-between;padding:0 10px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapni/auth",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.156",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/TapniAuth.umd.js",
|
|
6
6
|
"module": "./dist/TapniAuth.es.js",
|
|
@@ -46,8 +46,9 @@
|
|
|
46
46
|
"vuex": "^4.0.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
+
"@rollup/plugin-inject": "^5.0.5",
|
|
49
50
|
"@vitejs/plugin-vue": "^4.5.2",
|
|
50
51
|
"vite": "^5.0.10",
|
|
51
|
-
"vite-plugin-node-polyfills": "^0.
|
|
52
|
+
"vite-plugin-node-polyfills": "^0.22.0"
|
|
52
53
|
}
|
|
53
54
|
}
|
package/src/App.vue
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { RouterView } from 'vue-router'
|
|
3
3
|
// add Buffer globally
|
|
4
|
-
import { Buffer } from 'buffer';
|
|
5
|
-
import OTP from "@/components/OTP.vue";
|
|
4
|
+
import { Buffer } from 'buffer/';
|
|
6
5
|
window.Buffer = Buffer;
|
|
7
6
|
document.addEventListener('DOMContentLoaded', function() {
|
|
8
7
|
const recaptchaScript = document.createElement('script');
|
|
@@ -150,8 +149,8 @@ export default {
|
|
|
150
149
|
this.setView(this.viewProp);
|
|
151
150
|
|
|
152
151
|
EventBus.$on('ssoEvent', this.ssoOutgoingEvent)
|
|
153
|
-
EventBus.$on('ssoLogout',(data) => this.logout(data
|
|
154
|
-
EventBus.$on('getLoggedInAccounts',(
|
|
152
|
+
EventBus.$on('ssoLogout',(data) => this.logout(data))
|
|
153
|
+
EventBus.$on('getLoggedInAccounts',() => this.getLoggedInAccounts())
|
|
155
154
|
EventBus.$on('refreshTokenAction',(data) => this.refreshTokenAction({...data, storage: this.$storex}))
|
|
156
155
|
EventBus.$on('switchAccount',(data) => this.switchAccount(data))
|
|
157
156
|
EventBus.$on('setToken',(data) => this.setToken(data))
|
|
@@ -167,9 +166,6 @@ export default {
|
|
|
167
166
|
if (this.isSetup) return;
|
|
168
167
|
this.isSetup = true;
|
|
169
168
|
|
|
170
|
-
this.setToken(this.$storex.token);
|
|
171
|
-
const refreshTokens = this.getRefreshTokens();
|
|
172
|
-
this.setRefreshToken(refreshTokens[0]);
|
|
173
169
|
await this.getLoggedInAccounts();
|
|
174
170
|
|
|
175
171
|
// Let App know that the auth is ready
|
package/src/mixins/auth.mixin.js
CHANGED
package/src/store/auth.js
CHANGED
|
@@ -469,7 +469,7 @@ export default {
|
|
|
469
469
|
return response.data;
|
|
470
470
|
}
|
|
471
471
|
},
|
|
472
|
-
async getLoggedInAccounts({
|
|
472
|
+
async getLoggedInAccounts({ getters, dispatch }) {
|
|
473
473
|
if (getters.refreshTokens && getters.refreshTokens.length >= 1) {
|
|
474
474
|
const [err, response] = await to(
|
|
475
475
|
AuthService.getLoggedInAccounts({ refreshTokens: getters.refreshTokens })
|
|
@@ -494,10 +494,6 @@ export default {
|
|
|
494
494
|
setLoggedInUserId({ commit }, id) {
|
|
495
495
|
commit('setLoggedInUserId', id);
|
|
496
496
|
},
|
|
497
|
-
getRefreshTokens({ state }) {
|
|
498
|
-
if (state.$storex && state.$storex.refreshTokens) return state.$storex.refreshTokens.split(',')
|
|
499
|
-
else return [];
|
|
500
|
-
},
|
|
501
497
|
setRefreshToken({ commit }, token) {
|
|
502
498
|
commit('setRefreshToken', token);
|
|
503
499
|
},
|
|
@@ -545,8 +541,8 @@ export default {
|
|
|
545
541
|
return !!state.$storex.token && state.$storex.token !== "" && state.$storex.token !== "null";
|
|
546
542
|
},
|
|
547
543
|
renderView: state => {
|
|
548
|
-
if (state.display
|
|
549
|
-
return
|
|
544
|
+
if (state.display !== "npm") {
|
|
545
|
+
return '';
|
|
550
546
|
} else return state.view;
|
|
551
547
|
},
|
|
552
548
|
appRealm: state => {
|
package/src/views/Account.vue
CHANGED
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
|
|
118
118
|
<div class="divider"></div>
|
|
119
119
|
|
|
120
|
-
<div class="device" @click="
|
|
120
|
+
<div class="device" @click="logoutAccount">
|
|
121
121
|
<div class="left">
|
|
122
122
|
<img
|
|
123
123
|
src="https://cdn.tapni.co/icons/newLogout.svg"
|
|
@@ -179,8 +179,8 @@ export default {
|
|
|
179
179
|
toggleLanguageModal () {
|
|
180
180
|
EventBus.$emit('toggleSSOLanguageModal')
|
|
181
181
|
},
|
|
182
|
-
|
|
183
|
-
this.logout()
|
|
182
|
+
logoutAccount () {
|
|
183
|
+
this.logout({ refreshToken: this.refreshTokens[0], sendRequest: true })
|
|
184
184
|
},
|
|
185
185
|
}
|
|
186
186
|
};
|