@tapni/auth 0.0.155 → 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 +58 -0
- package/dist/Account-gL0FSIxc.js +111 -0
- package/dist/QR-SuxiYcMd.js +41 -0
- package/dist/TapniAuth.es.js +4 -0
- package/dist/TapniAuth.umd.js +141 -0
- package/dist/install-HnJgkMHx.js +18432 -0
- package/dist/style.css +1 -0
- package/dist/web-5VtGcKeU.js +86 -0
- package/dist/web-AImUTDQQ.js +54 -0
- package/dist/web-L3jORB19.js +92 -0
- package/dist/web-NrPZl3qD.js +124 -0
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/dist/assets/Account-jYx53Ez8.css +0 -1
- package/dist/assets/Account-y3eWZiE-.js +0 -1
- package/dist/assets/Inter-GTt1gSYM.ttf +0 -0
- package/dist/assets/QR-DEhuOqKE.js +0 -1
- package/dist/assets/fontawesome-webfont-14MvapIR.svg +0 -2671
- package/dist/assets/fontawesome-webfont-BuWBOUu1.eot +0 -0
- package/dist/assets/fontawesome-webfont-kAyvDFN2.ttf +0 -0
- package/dist/assets/index-NeBZUPRp.css +0 -1
- package/dist/assets/index-fqOl-PhG.js +0 -175
- package/dist/assets/web-41jcaSqX.js +0 -5
- package/dist/assets/web-DpLNFGm4.js +0 -1
- package/dist/assets/web-HoHDjtut.js +0 -1
- package/dist/assets/web-LtckmlSx.js +0 -1
- package/dist/assets/web-OYnbSjpS.js +0 -1
- package/dist/assets/web-UjLIo7kx.js +0 -1
- package/dist/assets/web-qJehsXi3.js +0 -1
- package/dist/index.html +0 -36
package/dist/style.css
ADDED
|
@@ -0,0 +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-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}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { WebPlugin as c } from "@capacitor/core";
|
|
2
|
+
class g extends c {
|
|
3
|
+
constructor() {
|
|
4
|
+
super();
|
|
5
|
+
}
|
|
6
|
+
loadScript() {
|
|
7
|
+
if (typeof document > "u")
|
|
8
|
+
return;
|
|
9
|
+
const e = "gapi";
|
|
10
|
+
if (document == null ? void 0 : document.getElementById(e))
|
|
11
|
+
return;
|
|
12
|
+
const n = document.getElementsByTagName("head")[0], t = document.createElement("script");
|
|
13
|
+
t.type = "text/javascript", t.defer = !0, t.async = !0, t.id = e, t.onload = this.platformJsLoaded.bind(this), t.src = "https://apis.google.com/js/platform.js", n.appendChild(t);
|
|
14
|
+
}
|
|
15
|
+
initialize(e = {
|
|
16
|
+
clientId: "",
|
|
17
|
+
scopes: [],
|
|
18
|
+
grantOfflineAccess: !1
|
|
19
|
+
}) {
|
|
20
|
+
var s, n;
|
|
21
|
+
if (typeof window > "u")
|
|
22
|
+
return;
|
|
23
|
+
const t = (s = document.getElementsByName("google-signin-client_id")[0]) === null || s === void 0 ? void 0 : s.content, i = e.clientId || t || "";
|
|
24
|
+
i || console.warn("GoogleAuthPlugin - clientId is empty"), this.options = {
|
|
25
|
+
clientId: i,
|
|
26
|
+
grantOfflineAccess: (n = e.grantOfflineAccess) !== null && n !== void 0 ? n : !1,
|
|
27
|
+
scopes: e.scopes || []
|
|
28
|
+
}, this.gapiLoaded = new Promise((o) => {
|
|
29
|
+
window.gapiResolve = o, this.loadScript();
|
|
30
|
+
}), this.addUserChangeListener();
|
|
31
|
+
}
|
|
32
|
+
platformJsLoaded() {
|
|
33
|
+
gapi.load("auth2", () => {
|
|
34
|
+
const e = {
|
|
35
|
+
client_id: this.options.clientId,
|
|
36
|
+
plugin_name: "CodetrixStudioCapacitorGoogleAuth"
|
|
37
|
+
};
|
|
38
|
+
this.options.scopes.length && (e.scope = this.options.scopes.join(" ")), gapi.auth2.init(e), window.gapiResolve();
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async signIn() {
|
|
42
|
+
return new Promise(async (e, s) => {
|
|
43
|
+
var n;
|
|
44
|
+
try {
|
|
45
|
+
let t;
|
|
46
|
+
const i = (n = this.options.grantOfflineAccess) !== null && n !== void 0 ? n : !1;
|
|
47
|
+
i ? t = (await gapi.auth2.getAuthInstance().grantOfflineAccess()).code : await gapi.auth2.getAuthInstance().signIn();
|
|
48
|
+
const o = gapi.auth2.getAuthInstance().currentUser.get();
|
|
49
|
+
i && await o.reloadAuthResponse();
|
|
50
|
+
const a = this.getUserFrom(o);
|
|
51
|
+
a.serverAuthCode = t, e(a);
|
|
52
|
+
} catch (t) {
|
|
53
|
+
s(t);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async refresh() {
|
|
58
|
+
const e = await gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse();
|
|
59
|
+
return {
|
|
60
|
+
accessToken: e.access_token,
|
|
61
|
+
idToken: e.id_token,
|
|
62
|
+
refreshToken: ""
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
async signOut() {
|
|
66
|
+
return gapi.auth2.getAuthInstance().signOut();
|
|
67
|
+
}
|
|
68
|
+
async addUserChangeListener() {
|
|
69
|
+
await this.gapiLoaded, gapi.auth2.getAuthInstance().currentUser.listen((e) => {
|
|
70
|
+
this.notifyListeners("userChange", e.isSignedIn() ? this.getUserFrom(e) : null);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
getUserFrom(e) {
|
|
74
|
+
const s = {}, n = e.getBasicProfile();
|
|
75
|
+
s.email = n.getEmail(), s.familyName = n.getFamilyName(), s.givenName = n.getGivenName(), s.id = n.getId(), s.imageUrl = n.getImageUrl(), s.name = n.getName();
|
|
76
|
+
const t = e.getAuthResponse(!0);
|
|
77
|
+
return s.authentication = {
|
|
78
|
+
accessToken: t.access_token,
|
|
79
|
+
idToken: t.id_token,
|
|
80
|
+
refreshToken: ""
|
|
81
|
+
}, s;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
g as GoogleAuthWeb
|
|
86
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { WebPlugin as p } from "@capacitor/core";
|
|
2
|
+
class f extends p {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this.group = "CapacitorStorage";
|
|
5
|
+
}
|
|
6
|
+
async configure({ group: e }) {
|
|
7
|
+
typeof e == "string" && (this.group = e);
|
|
8
|
+
}
|
|
9
|
+
async get(e) {
|
|
10
|
+
return { value: this.impl.getItem(this.applyPrefix(e.key)) };
|
|
11
|
+
}
|
|
12
|
+
async set(e) {
|
|
13
|
+
this.impl.setItem(this.applyPrefix(e.key), e.value);
|
|
14
|
+
}
|
|
15
|
+
async remove(e) {
|
|
16
|
+
this.impl.removeItem(this.applyPrefix(e.key));
|
|
17
|
+
}
|
|
18
|
+
async keys() {
|
|
19
|
+
return { keys: this.rawKeys().map((t) => t.substring(this.prefix.length)) };
|
|
20
|
+
}
|
|
21
|
+
async clear() {
|
|
22
|
+
for (const e of this.rawKeys())
|
|
23
|
+
this.impl.removeItem(e);
|
|
24
|
+
}
|
|
25
|
+
async migrate() {
|
|
26
|
+
var e;
|
|
27
|
+
const t = [], s = [], n = "_cap_", o = Object.keys(this.impl).filter((i) => i.indexOf(n) === 0);
|
|
28
|
+
for (const i of o) {
|
|
29
|
+
const r = i.substring(n.length), a = (e = this.impl.getItem(i)) !== null && e !== void 0 ? e : "", { value: l } = await this.get({ key: r });
|
|
30
|
+
typeof l == "string" ? s.push(r) : (await this.set({ key: r, value: a }), t.push(r));
|
|
31
|
+
}
|
|
32
|
+
return { migrated: t, existing: s };
|
|
33
|
+
}
|
|
34
|
+
async removeOld() {
|
|
35
|
+
const e = "_cap_", t = Object.keys(this.impl).filter((s) => s.indexOf(e) === 0);
|
|
36
|
+
for (const s of t)
|
|
37
|
+
this.impl.removeItem(s);
|
|
38
|
+
}
|
|
39
|
+
get impl() {
|
|
40
|
+
return window.localStorage;
|
|
41
|
+
}
|
|
42
|
+
get prefix() {
|
|
43
|
+
return this.group === "NativeStorage" ? "" : `${this.group}.`;
|
|
44
|
+
}
|
|
45
|
+
rawKeys() {
|
|
46
|
+
return Object.keys(this.impl).filter((e) => e.indexOf(this.prefix) === 0);
|
|
47
|
+
}
|
|
48
|
+
applyPrefix(e) {
|
|
49
|
+
return this.prefix + e;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
f as PreferencesWeb
|
|
54
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { WebPlugin as i } from "@capacitor/core";
|
|
2
|
+
class u extends i {
|
|
3
|
+
async initialize(e) {
|
|
4
|
+
const n = { version: "v17.0" };
|
|
5
|
+
return await this.loadScript(e.locale), FB.init(Object.assign(Object.assign({}, n), e));
|
|
6
|
+
}
|
|
7
|
+
loadScript(e) {
|
|
8
|
+
if (typeof document > "u")
|
|
9
|
+
return Promise.reject("document global not found");
|
|
10
|
+
const n = "fb";
|
|
11
|
+
if (document.getElementById(n))
|
|
12
|
+
return Promise.resolve();
|
|
13
|
+
const r = document.getElementsByTagName("head")[0], s = document.createElement("script");
|
|
14
|
+
return new Promise((o) => {
|
|
15
|
+
s.onload = () => o(), s.defer = !0, s.async = !0, s.id = n, s.src = `https://connect.facebook.net/${e ?? "en_US"}/sdk.js`, r.appendChild(s);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
async login(e) {
|
|
19
|
+
return new Promise((n, t) => {
|
|
20
|
+
FB.login((r) => {
|
|
21
|
+
r.status === "connected" ? n({
|
|
22
|
+
accessToken: {
|
|
23
|
+
token: r.authResponse.accessToken
|
|
24
|
+
}
|
|
25
|
+
}) : t({
|
|
26
|
+
accessToken: {
|
|
27
|
+
token: null
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}, { scope: e.permissions.join(",") });
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async logout() {
|
|
34
|
+
return new Promise((e) => FB.logout(() => e()));
|
|
35
|
+
}
|
|
36
|
+
async reauthorize() {
|
|
37
|
+
return new Promise((e) => FB.reauthorize((n) => e(n)));
|
|
38
|
+
}
|
|
39
|
+
async getCurrentAccessToken() {
|
|
40
|
+
return new Promise((e, n) => {
|
|
41
|
+
FB.getLoginStatus((t) => {
|
|
42
|
+
if (t.status === "connected") {
|
|
43
|
+
const r = {
|
|
44
|
+
accessToken: {
|
|
45
|
+
applicationId: void 0,
|
|
46
|
+
declinedPermissions: [],
|
|
47
|
+
expires: void 0,
|
|
48
|
+
isExpired: void 0,
|
|
49
|
+
lastRefresh: void 0,
|
|
50
|
+
permissions: [],
|
|
51
|
+
token: t.authResponse.accessToken,
|
|
52
|
+
userId: t.authResponse.userID
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
e(r);
|
|
56
|
+
} else
|
|
57
|
+
n({
|
|
58
|
+
accessToken: {
|
|
59
|
+
token: null
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async getProfile(e) {
|
|
66
|
+
const n = e.fields.join(",");
|
|
67
|
+
return new Promise((t, r) => {
|
|
68
|
+
FB.api("/me", { fields: n }, (s) => {
|
|
69
|
+
if (s.error) {
|
|
70
|
+
r(s.error.message);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
t(s);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
async logEvent() {
|
|
78
|
+
return Promise.resolve();
|
|
79
|
+
}
|
|
80
|
+
async setAutoLogAppEventsEnabled() {
|
|
81
|
+
return Promise.resolve();
|
|
82
|
+
}
|
|
83
|
+
async setAdvertiserTrackingEnabled() {
|
|
84
|
+
return Promise.resolve();
|
|
85
|
+
}
|
|
86
|
+
async setAdvertiserIDCollectionEnabled() {
|
|
87
|
+
return Promise.resolve();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
export {
|
|
91
|
+
u as FacebookLoginWeb
|
|
92
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { WebPlugin as j } from "@capacitor/core";
|
|
2
|
+
var w = { exports: {} };
|
|
3
|
+
/*!
|
|
4
|
+
* $script.js JS loader & dependency manager
|
|
5
|
+
* https://github.com/ded/script.js
|
|
6
|
+
* (c) Dustin Diaz 2014 | License MIT
|
|
7
|
+
*/
|
|
8
|
+
(function(y) {
|
|
9
|
+
(function(i, p) {
|
|
10
|
+
y.exports ? y.exports = p() : this[i] = p();
|
|
11
|
+
})("$script", function() {
|
|
12
|
+
var i = document, p = i.getElementsByTagName("head")[0], I = !1, m = "push", S = "readyState", A = "onreadystatechange", s = {}, o = {}, d = {}, f, v;
|
|
13
|
+
function g(e, t) {
|
|
14
|
+
for (var n = 0, u = e.length; n < u; ++n)
|
|
15
|
+
if (!t(e[n]))
|
|
16
|
+
return I;
|
|
17
|
+
return 1;
|
|
18
|
+
}
|
|
19
|
+
function h(e, t) {
|
|
20
|
+
g(e, function(n) {
|
|
21
|
+
return t(n), 1;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function l(e, t, n) {
|
|
25
|
+
e = e[m] ? e : [e];
|
|
26
|
+
var u = t && t.call, r = u ? t : n, N = u ? e.join("") : t, U = e.length;
|
|
27
|
+
function b(c) {
|
|
28
|
+
return c.call ? c() : s[c];
|
|
29
|
+
}
|
|
30
|
+
function _() {
|
|
31
|
+
if (!--U) {
|
|
32
|
+
s[N] = 1, r && r();
|
|
33
|
+
for (var c in o)
|
|
34
|
+
g(c.split("|"), b) && !h(o[c], b) && (o[c] = []);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return setTimeout(function() {
|
|
38
|
+
h(e, function c(a, W) {
|
|
39
|
+
if (a === null)
|
|
40
|
+
return _();
|
|
41
|
+
if (!W && !/^https?:\/\//.test(a) && f && (a = a.indexOf(".js") === -1 ? f + a + ".js" : f + a), d[a])
|
|
42
|
+
return d[a] == 2 ? _() : setTimeout(function() {
|
|
43
|
+
c(a, !0);
|
|
44
|
+
}, 0);
|
|
45
|
+
d[a] = 1, x(a, _);
|
|
46
|
+
});
|
|
47
|
+
}, 0), l;
|
|
48
|
+
}
|
|
49
|
+
function x(e, t) {
|
|
50
|
+
var n = i.createElement("script"), u;
|
|
51
|
+
n.onload = n.onerror = n[A] = function() {
|
|
52
|
+
n[S] && !/^c|loade/.test(n[S]) || u || (n.onload = n[A] = null, u = 1, d[e] = 2, t());
|
|
53
|
+
}, n.async = 1, n.src = v ? e + (e.indexOf("?") === -1 ? "?" : "&") + v : e, p.insertBefore(n, p.lastChild);
|
|
54
|
+
}
|
|
55
|
+
return l.get = x, l.order = function(e, t, n) {
|
|
56
|
+
(function u(r) {
|
|
57
|
+
r = e.shift(), e.length ? l(r, u) : l(r, t, n);
|
|
58
|
+
})();
|
|
59
|
+
}, l.path = function(e) {
|
|
60
|
+
f = e;
|
|
61
|
+
}, l.urlArgs = function(e) {
|
|
62
|
+
v = e;
|
|
63
|
+
}, l.ready = function(e, t, n) {
|
|
64
|
+
e = e[m] ? e : [e];
|
|
65
|
+
var u = [];
|
|
66
|
+
return !h(e, function(r) {
|
|
67
|
+
s[r] || u[m](r);
|
|
68
|
+
}) && g(e, function(r) {
|
|
69
|
+
return s[r];
|
|
70
|
+
}) ? t() : function(r) {
|
|
71
|
+
o[r] = o[r] || [], o[r][m](t), n && n(u);
|
|
72
|
+
}(e.join("|")), l;
|
|
73
|
+
}, l.done = function(e) {
|
|
74
|
+
l([null], e);
|
|
75
|
+
}, l;
|
|
76
|
+
});
|
|
77
|
+
})(w);
|
|
78
|
+
var z = w.exports;
|
|
79
|
+
class P extends j {
|
|
80
|
+
constructor() {
|
|
81
|
+
super({
|
|
82
|
+
name: "SignInWithApple",
|
|
83
|
+
platforms: ["web"]
|
|
84
|
+
}), this.appleScriptUrl = "https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js", this.isAppleScriptLoaded = !1;
|
|
85
|
+
}
|
|
86
|
+
async authorize(i) {
|
|
87
|
+
return new Promise((p, I) => {
|
|
88
|
+
i ? this.loadSignInWithAppleJS().then((m) => {
|
|
89
|
+
var S, A, s;
|
|
90
|
+
this.isAppleScriptLoaded = m, this.isAppleScriptLoaded ? (AppleID.auth.init({
|
|
91
|
+
clientId: i.clientId,
|
|
92
|
+
redirectURI: i.redirectURI,
|
|
93
|
+
scope: (S = i.scopes) !== null && S !== void 0 ? S : void 0,
|
|
94
|
+
state: (A = i.state) !== null && A !== void 0 ? A : void 0,
|
|
95
|
+
nonce: (s = i.nonce) !== null && s !== void 0 ? s : void 0,
|
|
96
|
+
usePopup: !0
|
|
97
|
+
}), AppleID.auth.signIn().then((o) => {
|
|
98
|
+
var d, f, v, g, h;
|
|
99
|
+
const l = {
|
|
100
|
+
response: {
|
|
101
|
+
user: null,
|
|
102
|
+
email: (d = o.user) === null || d === void 0 ? void 0 : d.email,
|
|
103
|
+
givenName: (v = (f = o.user) === null || f === void 0 ? void 0 : f.name) === null || v === void 0 ? void 0 : v.firstName,
|
|
104
|
+
familyName: (h = (g = o.user) === null || g === void 0 ? void 0 : g.name) === null || h === void 0 ? void 0 : h.lastName,
|
|
105
|
+
identityToken: o.authorization.id_token,
|
|
106
|
+
authorizationCode: o.authorization.code
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
p(l);
|
|
110
|
+
}).catch((o) => {
|
|
111
|
+
I(o);
|
|
112
|
+
})) : I("Unable to load Sign in with Apple JS framework.");
|
|
113
|
+
}) : I("No options were provided.");
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
loadSignInWithAppleJS() {
|
|
117
|
+
return new Promise((i) => {
|
|
118
|
+
this.isAppleScriptLoaded ? i(!0) : typeof window !== void 0 ? z.get(this.appleScriptUrl, () => i(!0)) : i(!1);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
export {
|
|
123
|
+
P as SignInWithAppleWeb
|
|
124
|
+
};
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -149,7 +149,7 @@ export default {
|
|
|
149
149
|
this.setView(this.viewProp);
|
|
150
150
|
|
|
151
151
|
EventBus.$on('ssoEvent', this.ssoOutgoingEvent)
|
|
152
|
-
EventBus.$on('ssoLogout',(data) => this.logout(data
|
|
152
|
+
EventBus.$on('ssoLogout',(data) => this.logout(data))
|
|
153
153
|
EventBus.$on('getLoggedInAccounts',() => this.getLoggedInAccounts())
|
|
154
154
|
EventBus.$on('refreshTokenAction',(data) => this.refreshTokenAction({...data, storage: this.$storex}))
|
|
155
155
|
EventBus.$on('switchAccount',(data) => this.switchAccount(data))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.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}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as d,A as l,E as g,o as r,c as _,a as t,t as c,d as i,p,e as u}from"./index-fqOl-PhG.js";var h={VITE_APP_MODE:"redirect",VITE_APP_APP_ROOT:"https://t.link",VITE_APP_API_ROOT:"https://api.tapni.co",VITE_APP_GOOGLE_RECAPTCHA_SITE_KEY:"6LenkC0mAAAAADWBxPOhpmwXCwzCJd7cilNgtOLk",VITE_APP_SSO_ID:"9cd47053-080a-4df8-8fd8-ca4389163fde",VITE_APP_POPUP_LOGIN_ALLOWED_ORIGIN:"https://auth.tapni.com",BASE_URL:"/",MODE:"standalone",DEV:!1,PROD:!0,SSR:!1};const f={mixins:[l],data(){return{expanded:!1,addAccountReady:!1,appVersion:h.APP_VERSION}},async mounted(){this.getAccountSettings()},methods:{continueTo(e){console.log("continue to "+e)},addAccount(){this.$router.push("/login")},switchAccount(e){console.log("switch",e)},toggleAccountSettingsModal(){this.$router.push("/mfa")},toggleLanguageModal(){g.$emit("toggleSSOLanguageModal")},logoutAccount(){this.logout({refreshToken:this.refreshTokens[0],sendRequest:!0})}}},o=e=>(p("data-v-f536b602"),e=e(),u(),e),v={class:"page-login content-boxed content-boxed-padding center-text",style:{"margin-top":"-1px",overflow:"hidden",border:"solid 0px #ffffff"}},m=o(()=>t("br",null,null,-1)),A={class:"bold full-top no-bottom center-text"},L={class:"full-bottom half-top center-text color-black font-16"};const P={class:"container"},b={class:"settingsCard pointer left-text"},E=o(()=>t("div",{class:"left"},[t("img",{src:"https://cdn.tapni.co/icons/newSettings.svg",style:{width:"50px","border-radius":"20px"}})],-1)),S={class:"middle"},k=o(()=>t("div",{class:"right"},[t("img",{src:"https://cdn.tapni.co/icons/newArrowRight.svg"})],-1)),w=o(()=>t("div",{class:"divider"},null,-1)),x=o(()=>t("div",{class:"left"},[t("img",{src:"https://cdn.tapni.co/icons/newPublicProfile.svg",style:{width:"50px","border-radius":"20px"}})],-1)),O={class:"middle"},V=o(()=>t("div",{class:"right"},[t("img",{src:"https://cdn.tapni.co/icons/newArrowRight.svg"})],-1)),I=o(()=>t("div",{class:"divider"},null,-1)),T=o(()=>t("div",{class:"left"},[t("img",{src:"https://cdn.tapni.co/icons/newLogout.svg",style:{width:"50px","border-radius":"20px"}})],-1)),B={class:"middle"},N=o(()=>t("div",{class:"right"},[t("img",{src:"https://cdn.tapni.co/icons/newArrowRight.svg"})],-1));function R(e,n,y,C,D,a){return r(),_("div",v,[m,t("h1",A,c(e.ssoLang[e.appLanguage].welcome),1),t("p",L,c(e.account.email),1),(e.display,i("",!0)),t("div",P,[i("",!0),t("div",b,[t("div",{class:"device",onClick:n[4]||(n[4]=(...s)=>a.toggleAccountSettingsModal&&a.toggleAccountSettingsModal(...s))},[E,t("div",S,[t("h4",null,c(e.ssoLang[e.appLanguage].mfa),1)]),k]),w,t("div",{class:"device",onClick:n[5]||(n[5]=(...s)=>a.toggleLanguageModal&&a.toggleLanguageModal(...s))},[x,t("div",O,[t("h4",null,c(e.ssoLang[e.appLanguage].change_language),1)]),V]),I,t("div",{class:"device",onClick:n[6]||(n[6]=(...s)=>a.logoutAccount&&a.logoutAccount(...s))},[T,t("div",B,[t("h4",null,c(e.ssoLang[e.appLanguage].logout),1)]),N]),i("",!0)])])])}const G=d(f,[["render",R],["__scopeId","data-v-f536b602"]]);export{G as default};
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as s,A as a,Q as i,r as l,o as _,c as r,a as n,t as o,f as d,w as u,b as p}from"./index-fqOl-PhG.js";const g={name:"AuthQR",mixins:[a,i]},c={class:"page-login content-boxed content-boxed-padding"},h={style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"130px"}},m=n("br",null,null,-1),L={class:"qrCodeLoginContainer center-text"},b=n("div",{id:"qrCodeContainer",class:"qrCodeRounded",style:{"max-width":"100%"}},null,-1),f=n("br",null,null,-1),y=n("br",null,null,-1),C={style:{margin:"0 auto",width:"85%","text-align":"left"}},v={class:"center-text"},w=n("br",null,null,-1),k=n("br",null,null,-1),q=n("br",null,null,-1);function x(e,A,Q,R,$,B){const t=l("router-link");return _(),r("div",c,[n("h5",h,o(e.ssoLang[e.appLanguage].use_tapni_on_the_web),1),m,n("div",L,[b,f,y,n("div",C,[n("h2",v,o(e.ssoLang[e.appLanguage].login_by_scanning_qr_code),1),w,n("h4",null,o(e.ssoLang[e.appLanguage].open_tapni_app_on_your_phone),1),n("h4",null,o(e.ssoLang[e.appLanguage].go_to_settings_link_a_device),1),n("h4",null,o(e.ssoLang[e.appLanguage].point_your_phone_at_this_qr_code),1),k,q]),d(t,{to:"/login"},{default:u(()=>[p(o(e.ssoLang[e.appLanguage].choose_other_login_methods),1)]),_:1})])])}const V=s(g,[["render",x]]);export{V as default};
|