@tapni/auth 0.0.71 → 0.0.73
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 +706 -705
- package/dist/TapniAuth.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +12 -5
- package/src/mixins/apple.mixin.js +1 -2
- package/src/mixins/auth.mixin.js +8 -11
- package/src/mixins/google.mixin.js +1 -2
- package/src/mixins/microsoft.mixin.js +1 -2
- package/src/views/Welcome.vue +1 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.app-store-icon[data-v-
|
|
1
|
+
.app-store-icon[data-v-c4cf0a57]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-af1531aa],#emailInput[data-v-af1531aa],#emailInput[data-v-4f85b89a]{text-align:center;padding-right:15%;font-size:17px}.fade-enter-to[data-v-a128c2fa]{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-34a6b7b2]{margin:2px auto 0;width:65px}input[data-v-34a6b7b2]{margin:0 auto;height:25px}html *{font-family:Inter,sans-serif}#bodyId{padding-top:3%;max-width:550px!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}
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -22,9 +22,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
<ModalOverlay />
|
|
25
|
-
<Language />
|
|
26
|
-
<SSO />
|
|
27
|
-
<SSOPick />
|
|
25
|
+
<Language v-if="!isModal" />
|
|
26
|
+
<SSO v-if="!isModal" />
|
|
27
|
+
<SSOPick v-if="!isModal" />
|
|
28
28
|
|
|
29
29
|
<AuthWelcome v-if="initialized && renderView === 'AuthWelcome'" />
|
|
30
30
|
<AuthLogin v-else-if="initialized && renderView === 'AuthLogin'" :isModal="isModal" />
|
|
@@ -128,7 +128,6 @@ export default {
|
|
|
128
128
|
},
|
|
129
129
|
methods: {
|
|
130
130
|
async init () {
|
|
131
|
-
|
|
132
131
|
// Make sure the function is called just once
|
|
133
132
|
if (this.isSetup) return;
|
|
134
133
|
this.isSetup = true;
|
|
@@ -136,7 +135,9 @@ export default {
|
|
|
136
135
|
this.setToken(this.$storage.token);
|
|
137
136
|
const refreshTokens = this.getRefreshTokens();
|
|
138
137
|
this.setRefreshToken(refreshTokens[0]);
|
|
139
|
-
this.getLoggedInAccounts();
|
|
138
|
+
await this.getLoggedInAccounts();
|
|
139
|
+
|
|
140
|
+
// Let App know that the auth is ready
|
|
140
141
|
this.$emit('ssoLibraryReady');
|
|
141
142
|
},
|
|
142
143
|
ssoOutgoingEvent (data) {
|
|
@@ -160,6 +161,12 @@ export default {
|
|
|
160
161
|
display () {
|
|
161
162
|
this.applyBgStyle()
|
|
162
163
|
},
|
|
164
|
+
'$storageReady.value' (nv) {
|
|
165
|
+
if (nv && this.display === 'npm') {
|
|
166
|
+
// Initialize Library after all event listeners & storage are set
|
|
167
|
+
this.init()
|
|
168
|
+
}
|
|
169
|
+
}
|
|
163
170
|
}
|
|
164
171
|
}
|
|
165
172
|
</script>
|
|
@@ -45,8 +45,7 @@ export default {
|
|
|
45
45
|
}
|
|
46
46
|
await this.loginSetup(response)
|
|
47
47
|
this.getLoggedInAccounts()
|
|
48
|
-
|
|
49
|
-
this.loginSuccess({ ...response, isModal: false });
|
|
48
|
+
this.loginSuccess({ ...response, isModal: this.isModal });
|
|
50
49
|
setTimeout(() => {
|
|
51
50
|
this.appleLoad = false
|
|
52
51
|
}, 1000)
|
package/src/mixins/auth.mixin.js
CHANGED
|
@@ -214,14 +214,6 @@ export default {
|
|
|
214
214
|
// Save Access Token
|
|
215
215
|
if (response.data.token) this.setToken(response.data.token);
|
|
216
216
|
|
|
217
|
-
// Update Language
|
|
218
|
-
if (response.data?.data?.ssoLang !== this.appLanguage) {
|
|
219
|
-
EventBus.$emit("ssoEvent", {
|
|
220
|
-
name: "saveProfile",
|
|
221
|
-
data: { lang: this.appLanguage, username: response.data.data.username },
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
|
|
225
217
|
this.setLoggedInUserId(response.data.data.id);
|
|
226
218
|
|
|
227
219
|
this.$storage.UserId = response.data.data.id;
|
|
@@ -254,7 +246,10 @@ export default {
|
|
|
254
246
|
});
|
|
255
247
|
},
|
|
256
248
|
async refreshTokenAction(data) {
|
|
257
|
-
if (!this.refreshToken || this.refreshing)
|
|
249
|
+
if (!this.refreshToken || this.refreshing) {
|
|
250
|
+
console.log('return-refreshTokenAction', this.refreshToken, this.refreshing);
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
258
253
|
|
|
259
254
|
this.refreshing = true;
|
|
260
255
|
const [err, response] = await to(
|
|
@@ -438,8 +433,10 @@ export default {
|
|
|
438
433
|
});
|
|
439
434
|
}
|
|
440
435
|
});
|
|
441
|
-
} else
|
|
442
|
-
|
|
436
|
+
} else {
|
|
437
|
+
this.setUser(null);
|
|
438
|
+
this.$router.push("/welcome");
|
|
439
|
+
}
|
|
443
440
|
},
|
|
444
441
|
async getCompanyBySSOEmail(data) {
|
|
445
442
|
const [err, response] = await to(
|
|
@@ -46,8 +46,7 @@ export default {
|
|
|
46
46
|
}
|
|
47
47
|
await this.loginSetup(response)
|
|
48
48
|
this.getLoggedInAccounts()
|
|
49
|
-
|
|
50
|
-
this.loginSuccess({ ...response, isModal: false });
|
|
49
|
+
this.loginSuccess({ ...response, isModal: this.isModal });
|
|
51
50
|
setTimeout(() => {
|
|
52
51
|
this.googleLoad = false
|
|
53
52
|
}, 1000)
|
|
@@ -67,8 +67,7 @@ export default {
|
|
|
67
67
|
}
|
|
68
68
|
await this.loginSetup(response);
|
|
69
69
|
this.getLoggedInAccounts();
|
|
70
|
-
|
|
71
|
-
this.loginSuccess({ ...response, isModal: false });
|
|
70
|
+
this.loginSuccess({ ...response, isModal: this.isModal });
|
|
72
71
|
setTimeout(() => {
|
|
73
72
|
this.microsoftLoad = false;
|
|
74
73
|
this.microsoftSSOLoad = false;
|