@turnkey/sdk-react 3.0.0 → 3.0.1
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/CHANGELOG.md +13 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs +470 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs.map +1 -0
- package/dist/components/auth/Apple.js +78 -64
- package/dist/components/auth/Apple.js.map +1 -1
- package/dist/components/auth/Apple.mjs +85 -64
- package/dist/components/auth/Apple.mjs.map +1 -1
- package/dist/components/auth/Auth.d.ts +3 -0
- package/dist/components/auth/Auth.d.ts.map +1 -1
- package/dist/components/auth/Auth.js +507 -259
- package/dist/components/auth/Auth.js.map +1 -1
- package/dist/components/auth/Auth.mjs +725 -229
- package/dist/components/auth/Auth.mjs.map +1 -1
- package/dist/components/auth/Facebook.js +78 -63
- package/dist/components/auth/Facebook.js.map +1 -1
- package/dist/components/auth/Facebook.mjs +121 -54
- package/dist/components/auth/Facebook.mjs.map +1 -1
- package/dist/components/auth/Google.js +63 -47
- package/dist/components/auth/Google.js.map +1 -1
- package/dist/components/auth/Google.mjs +70 -39
- package/dist/components/auth/Google.mjs.map +1 -1
- package/dist/components/auth/OtpVerification.js +106 -51
- package/dist/components/auth/OtpVerification.js.map +1 -1
- package/dist/components/auth/OtpVerification.mjs +151 -41
- package/dist/components/auth/OtpVerification.mjs.map +1 -1
- package/dist/components/auth/PhoneInput.d.ts.map +1 -1
- package/dist/components/auth/PhoneInput.js +138 -69
- package/dist/components/auth/PhoneInput.js.map +1 -1
- package/dist/components/auth/PhoneInput.mjs +141 -70
- package/dist/components/auth/PhoneInput.mjs.map +1 -1
- package/dist/components/auth/TurnkeyThemeProvider.js +26 -17
- package/dist/components/auth/TurnkeyThemeProvider.js.map +1 -1
- package/dist/components/auth/TurnkeyThemeProvider.mjs +33 -18
- package/dist/components/auth/TurnkeyThemeProvider.mjs.map +1 -1
- package/dist/components/auth/constants.js +26 -26
- package/dist/components/auth/constants.js.map +1 -1
- package/dist/components/auth/constants.mjs +34 -34
- package/dist/components/auth/constants.mjs.map +1 -1
- package/dist/components/auth/facebookUtils.js +23 -21
- package/dist/components/auth/facebookUtils.js.map +1 -1
- package/dist/components/auth/facebookUtils.mjs +65 -23
- package/dist/components/auth/facebookUtils.mjs.map +1 -1
- package/dist/components/auth/otp.js +84 -71
- package/dist/components/auth/otp.js.map +1 -1
- package/dist/components/auth/otp.mjs +96 -70
- package/dist/components/auth/otp.mjs.map +1 -1
- package/dist/components/auth/utils.js +3 -3
- package/dist/components/auth/utils.js.map +1 -1
- package/dist/components/auth/utils.mjs +3 -3
- package/dist/components/auth/utils.mjs.map +1 -1
- package/dist/components/export/Export.js +181 -99
- package/dist/components/export/Export.js.map +1 -1
- package/dist/components/export/Export.mjs +257 -89
- package/dist/components/export/Export.mjs.map +1 -1
- package/dist/components/import/Import.js +185 -132
- package/dist/components/import/Import.js.map +1 -1
- package/dist/components/import/Import.mjs +264 -120
- package/dist/components/import/Import.mjs.map +1 -1
- package/dist/contexts/TurnkeyContext.d.ts.map +1 -1
- package/dist/contexts/TurnkeyContext.js +113 -93
- package/dist/contexts/TurnkeyContext.js.map +1 -1
- package/dist/contexts/TurnkeyContext.mjs +191 -92
- package/dist/contexts/TurnkeyContext.mjs.map +1 -1
- package/dist/hooks/use-session.js +16 -13
- package/dist/hooks/use-session.js.map +1 -1
- package/dist/hooks/use-session.mjs +18 -13
- package/dist/hooks/use-session.mjs.map +1 -1
- package/dist/hooks/use-turnkey.js +5 -5
- package/dist/hooks/use-turnkey.js.map +1 -1
- package/dist/hooks/use-turnkey.mjs +6 -6
- package/dist/hooks/use-turnkey.mjs.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @turnkey/sdk-react
|
|
2
2
|
|
|
3
|
+
## 3.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cb8cf7e: Add all supported country codes to phone input field
|
|
8
|
+
- 2eb2179: Fix bundling issue with sdk-react
|
|
9
|
+
- Updated dependencies [755833b]
|
|
10
|
+
- Updated dependencies [2bc0046]
|
|
11
|
+
- @turnkey/sdk-browser@1.12.1
|
|
12
|
+
- @turnkey/sdk-server@2.0.1
|
|
13
|
+
- @turnkey/crypto@2.3.1
|
|
14
|
+
- @turnkey/wallet-stamper@1.0.3
|
|
15
|
+
|
|
3
16
|
## 3.0.0
|
|
4
17
|
|
|
5
18
|
### Major Changes
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
function _iterableToArrayLimit(r, l) {
|
|
2
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
3
|
+
if (null != t) {
|
|
4
|
+
var e,
|
|
5
|
+
n,
|
|
6
|
+
i,
|
|
7
|
+
u,
|
|
8
|
+
a = [],
|
|
9
|
+
f = !0,
|
|
10
|
+
o = !1;
|
|
11
|
+
try {
|
|
12
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
13
|
+
if (Object(t) !== t) return;
|
|
14
|
+
f = !1;
|
|
15
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
16
|
+
} catch (r) {
|
|
17
|
+
o = !0, n = r;
|
|
18
|
+
} finally {
|
|
19
|
+
try {
|
|
20
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
21
|
+
} finally {
|
|
22
|
+
if (o) throw n;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return a;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function ownKeys(e, r) {
|
|
29
|
+
var t = Object.keys(e);
|
|
30
|
+
if (Object.getOwnPropertySymbols) {
|
|
31
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
32
|
+
r && (o = o.filter(function (r) {
|
|
33
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
34
|
+
})), t.push.apply(t, o);
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
}
|
|
38
|
+
function _objectSpread2(e) {
|
|
39
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
40
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
41
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
42
|
+
_defineProperty(e, r, t[r]);
|
|
43
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
44
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return e;
|
|
48
|
+
}
|
|
49
|
+
function _regeneratorRuntime() {
|
|
50
|
+
_regeneratorRuntime = function () {
|
|
51
|
+
return e;
|
|
52
|
+
};
|
|
53
|
+
var t,
|
|
54
|
+
e = {},
|
|
55
|
+
r = Object.prototype,
|
|
56
|
+
n = r.hasOwnProperty,
|
|
57
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
58
|
+
t[e] = r.value;
|
|
59
|
+
},
|
|
60
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
61
|
+
a = i.iterator || "@@iterator",
|
|
62
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
63
|
+
u = i.toStringTag || "@@toStringTag";
|
|
64
|
+
function define(t, e, r) {
|
|
65
|
+
return Object.defineProperty(t, e, {
|
|
66
|
+
value: r,
|
|
67
|
+
enumerable: !0,
|
|
68
|
+
configurable: !0,
|
|
69
|
+
writable: !0
|
|
70
|
+
}), t[e];
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
define({}, "");
|
|
74
|
+
} catch (t) {
|
|
75
|
+
define = function (t, e, r) {
|
|
76
|
+
return t[e] = r;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function wrap(t, e, r, n) {
|
|
80
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
81
|
+
a = Object.create(i.prototype),
|
|
82
|
+
c = new Context(n || []);
|
|
83
|
+
return o(a, "_invoke", {
|
|
84
|
+
value: makeInvokeMethod(t, r, c)
|
|
85
|
+
}), a;
|
|
86
|
+
}
|
|
87
|
+
function tryCatch(t, e, r) {
|
|
88
|
+
try {
|
|
89
|
+
return {
|
|
90
|
+
type: "normal",
|
|
91
|
+
arg: t.call(e, r)
|
|
92
|
+
};
|
|
93
|
+
} catch (t) {
|
|
94
|
+
return {
|
|
95
|
+
type: "throw",
|
|
96
|
+
arg: t
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
e.wrap = wrap;
|
|
101
|
+
var h = "suspendedStart",
|
|
102
|
+
l = "suspendedYield",
|
|
103
|
+
f = "executing",
|
|
104
|
+
s = "completed",
|
|
105
|
+
y = {};
|
|
106
|
+
function Generator() {}
|
|
107
|
+
function GeneratorFunction() {}
|
|
108
|
+
function GeneratorFunctionPrototype() {}
|
|
109
|
+
var p = {};
|
|
110
|
+
define(p, a, function () {
|
|
111
|
+
return this;
|
|
112
|
+
});
|
|
113
|
+
var d = Object.getPrototypeOf,
|
|
114
|
+
v = d && d(d(values([])));
|
|
115
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
116
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
117
|
+
function defineIteratorMethods(t) {
|
|
118
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
119
|
+
define(t, e, function (t) {
|
|
120
|
+
return this._invoke(e, t);
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function AsyncIterator(t, e) {
|
|
125
|
+
function invoke(r, o, i, a) {
|
|
126
|
+
var c = tryCatch(t[r], t, o);
|
|
127
|
+
if ("throw" !== c.type) {
|
|
128
|
+
var u = c.arg,
|
|
129
|
+
h = u.value;
|
|
130
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
131
|
+
invoke("next", t, i, a);
|
|
132
|
+
}, function (t) {
|
|
133
|
+
invoke("throw", t, i, a);
|
|
134
|
+
}) : e.resolve(h).then(function (t) {
|
|
135
|
+
u.value = t, i(u);
|
|
136
|
+
}, function (t) {
|
|
137
|
+
return invoke("throw", t, i, a);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
a(c.arg);
|
|
141
|
+
}
|
|
142
|
+
var r;
|
|
143
|
+
o(this, "_invoke", {
|
|
144
|
+
value: function (t, n) {
|
|
145
|
+
function callInvokeWithMethodAndArg() {
|
|
146
|
+
return new e(function (e, r) {
|
|
147
|
+
invoke(t, n, e, r);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
function makeInvokeMethod(e, r, n) {
|
|
155
|
+
var o = h;
|
|
156
|
+
return function (i, a) {
|
|
157
|
+
if (o === f) throw Error("Generator is already running");
|
|
158
|
+
if (o === s) {
|
|
159
|
+
if ("throw" === i) throw a;
|
|
160
|
+
return {
|
|
161
|
+
value: t,
|
|
162
|
+
done: !0
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
for (n.method = i, n.arg = a;;) {
|
|
166
|
+
var c = n.delegate;
|
|
167
|
+
if (c) {
|
|
168
|
+
var u = maybeInvokeDelegate(c, n);
|
|
169
|
+
if (u) {
|
|
170
|
+
if (u === y) continue;
|
|
171
|
+
return u;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
175
|
+
if (o === h) throw o = s, n.arg;
|
|
176
|
+
n.dispatchException(n.arg);
|
|
177
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
178
|
+
o = f;
|
|
179
|
+
var p = tryCatch(e, r, n);
|
|
180
|
+
if ("normal" === p.type) {
|
|
181
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
182
|
+
return {
|
|
183
|
+
value: p.arg,
|
|
184
|
+
done: n.done
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function maybeInvokeDelegate(e, r) {
|
|
192
|
+
var n = r.method,
|
|
193
|
+
o = e.iterator[n];
|
|
194
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
195
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
196
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
197
|
+
var a = i.arg;
|
|
198
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
199
|
+
}
|
|
200
|
+
function pushTryEntry(t) {
|
|
201
|
+
var e = {
|
|
202
|
+
tryLoc: t[0]
|
|
203
|
+
};
|
|
204
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
205
|
+
}
|
|
206
|
+
function resetTryEntry(t) {
|
|
207
|
+
var e = t.completion || {};
|
|
208
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
209
|
+
}
|
|
210
|
+
function Context(t) {
|
|
211
|
+
this.tryEntries = [{
|
|
212
|
+
tryLoc: "root"
|
|
213
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
214
|
+
}
|
|
215
|
+
function values(e) {
|
|
216
|
+
if (e || "" === e) {
|
|
217
|
+
var r = e[a];
|
|
218
|
+
if (r) return r.call(e);
|
|
219
|
+
if ("function" == typeof e.next) return e;
|
|
220
|
+
if (!isNaN(e.length)) {
|
|
221
|
+
var o = -1,
|
|
222
|
+
i = function next() {
|
|
223
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
224
|
+
return next.value = t, next.done = !0, next;
|
|
225
|
+
};
|
|
226
|
+
return i.next = i;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
230
|
+
}
|
|
231
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
232
|
+
value: GeneratorFunctionPrototype,
|
|
233
|
+
configurable: !0
|
|
234
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
235
|
+
value: GeneratorFunction,
|
|
236
|
+
configurable: !0
|
|
237
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
238
|
+
var e = "function" == typeof t && t.constructor;
|
|
239
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
240
|
+
}, e.mark = function (t) {
|
|
241
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
242
|
+
}, e.awrap = function (t) {
|
|
243
|
+
return {
|
|
244
|
+
__await: t
|
|
245
|
+
};
|
|
246
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
247
|
+
return this;
|
|
248
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
249
|
+
void 0 === i && (i = Promise);
|
|
250
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
251
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
252
|
+
return t.done ? t.value : a.next();
|
|
253
|
+
});
|
|
254
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
255
|
+
return this;
|
|
256
|
+
}), define(g, "toString", function () {
|
|
257
|
+
return "[object Generator]";
|
|
258
|
+
}), e.keys = function (t) {
|
|
259
|
+
var e = Object(t),
|
|
260
|
+
r = [];
|
|
261
|
+
for (var n in e) r.push(n);
|
|
262
|
+
return r.reverse(), function next() {
|
|
263
|
+
for (; r.length;) {
|
|
264
|
+
var t = r.pop();
|
|
265
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
266
|
+
}
|
|
267
|
+
return next.done = !0, next;
|
|
268
|
+
};
|
|
269
|
+
}, e.values = values, Context.prototype = {
|
|
270
|
+
constructor: Context,
|
|
271
|
+
reset: function (e) {
|
|
272
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
273
|
+
},
|
|
274
|
+
stop: function () {
|
|
275
|
+
this.done = !0;
|
|
276
|
+
var t = this.tryEntries[0].completion;
|
|
277
|
+
if ("throw" === t.type) throw t.arg;
|
|
278
|
+
return this.rval;
|
|
279
|
+
},
|
|
280
|
+
dispatchException: function (e) {
|
|
281
|
+
if (this.done) throw e;
|
|
282
|
+
var r = this;
|
|
283
|
+
function handle(n, o) {
|
|
284
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
285
|
+
}
|
|
286
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
287
|
+
var i = this.tryEntries[o],
|
|
288
|
+
a = i.completion;
|
|
289
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
290
|
+
if (i.tryLoc <= this.prev) {
|
|
291
|
+
var c = n.call(i, "catchLoc"),
|
|
292
|
+
u = n.call(i, "finallyLoc");
|
|
293
|
+
if (c && u) {
|
|
294
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
295
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
296
|
+
} else if (c) {
|
|
297
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
298
|
+
} else {
|
|
299
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
300
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
abrupt: function (t, e) {
|
|
306
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
307
|
+
var o = this.tryEntries[r];
|
|
308
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
309
|
+
var i = o;
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
314
|
+
var a = i ? i.completion : {};
|
|
315
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
316
|
+
},
|
|
317
|
+
complete: function (t, e) {
|
|
318
|
+
if ("throw" === t.type) throw t.arg;
|
|
319
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
320
|
+
},
|
|
321
|
+
finish: function (t) {
|
|
322
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
323
|
+
var r = this.tryEntries[e];
|
|
324
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
catch: function (t) {
|
|
328
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
329
|
+
var r = this.tryEntries[e];
|
|
330
|
+
if (r.tryLoc === t) {
|
|
331
|
+
var n = r.completion;
|
|
332
|
+
if ("throw" === n.type) {
|
|
333
|
+
var o = n.arg;
|
|
334
|
+
resetTryEntry(r);
|
|
335
|
+
}
|
|
336
|
+
return o;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
throw Error("illegal catch attempt");
|
|
340
|
+
},
|
|
341
|
+
delegateYield: function (e, r, n) {
|
|
342
|
+
return this.delegate = {
|
|
343
|
+
iterator: values(e),
|
|
344
|
+
resultName: r,
|
|
345
|
+
nextLoc: n
|
|
346
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
347
|
+
}
|
|
348
|
+
}, e;
|
|
349
|
+
}
|
|
350
|
+
function _toPrimitive(t, r) {
|
|
351
|
+
if ("object" != typeof t || !t) return t;
|
|
352
|
+
var e = t[Symbol.toPrimitive];
|
|
353
|
+
if (void 0 !== e) {
|
|
354
|
+
var i = e.call(t, r || "default");
|
|
355
|
+
if ("object" != typeof i) return i;
|
|
356
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
357
|
+
}
|
|
358
|
+
return ("string" === r ? String : Number)(t);
|
|
359
|
+
}
|
|
360
|
+
function _toPropertyKey(t) {
|
|
361
|
+
var i = _toPrimitive(t, "string");
|
|
362
|
+
return "symbol" == typeof i ? i : i + "";
|
|
363
|
+
}
|
|
364
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
365
|
+
try {
|
|
366
|
+
var info = gen[key](arg);
|
|
367
|
+
var value = info.value;
|
|
368
|
+
} catch (error) {
|
|
369
|
+
reject(error);
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
if (info.done) {
|
|
373
|
+
resolve(value);
|
|
374
|
+
} else {
|
|
375
|
+
Promise.resolve(value).then(_next, _throw);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
function _asyncToGenerator(fn) {
|
|
379
|
+
return function () {
|
|
380
|
+
var self = this,
|
|
381
|
+
args = arguments;
|
|
382
|
+
return new Promise(function (resolve, reject) {
|
|
383
|
+
var gen = fn.apply(self, args);
|
|
384
|
+
function _next(value) {
|
|
385
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
386
|
+
}
|
|
387
|
+
function _throw(err) {
|
|
388
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
389
|
+
}
|
|
390
|
+
_next(undefined);
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
function _defineProperty(obj, key, value) {
|
|
395
|
+
key = _toPropertyKey(key);
|
|
396
|
+
if (key in obj) {
|
|
397
|
+
Object.defineProperty(obj, key, {
|
|
398
|
+
value: value,
|
|
399
|
+
enumerable: true,
|
|
400
|
+
configurable: true,
|
|
401
|
+
writable: true
|
|
402
|
+
});
|
|
403
|
+
} else {
|
|
404
|
+
obj[key] = value;
|
|
405
|
+
}
|
|
406
|
+
return obj;
|
|
407
|
+
}
|
|
408
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
409
|
+
if (source == null) return {};
|
|
410
|
+
var target = {};
|
|
411
|
+
for (var key in source) {
|
|
412
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
413
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
414
|
+
target[key] = source[key];
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return target;
|
|
418
|
+
}
|
|
419
|
+
function _objectWithoutProperties(source, excluded) {
|
|
420
|
+
if (source == null) return {};
|
|
421
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
422
|
+
var key, i;
|
|
423
|
+
if (Object.getOwnPropertySymbols) {
|
|
424
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
425
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
426
|
+
key = sourceSymbolKeys[i];
|
|
427
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
428
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
429
|
+
target[key] = source[key];
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
return target;
|
|
433
|
+
}
|
|
434
|
+
function _slicedToArray(arr, i) {
|
|
435
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
436
|
+
}
|
|
437
|
+
function _toConsumableArray(arr) {
|
|
438
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
439
|
+
}
|
|
440
|
+
function _arrayWithoutHoles(arr) {
|
|
441
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
442
|
+
}
|
|
443
|
+
function _arrayWithHoles(arr) {
|
|
444
|
+
if (Array.isArray(arr)) return arr;
|
|
445
|
+
}
|
|
446
|
+
function _iterableToArray(iter) {
|
|
447
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
448
|
+
}
|
|
449
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
450
|
+
if (!o) return;
|
|
451
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
452
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
453
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
454
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
455
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
456
|
+
}
|
|
457
|
+
function _arrayLikeToArray(arr, len) {
|
|
458
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
459
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
460
|
+
return arr2;
|
|
461
|
+
}
|
|
462
|
+
function _nonIterableSpread() {
|
|
463
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
464
|
+
}
|
|
465
|
+
function _nonIterableRest() {
|
|
466
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _asyncToGenerator as asyncToGenerator, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _regeneratorRuntime as regeneratorRuntime, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _unsupportedIterableToArray as unsupportedIterableToArray };
|
|
470
|
+
//# sourceMappingURL=_rollupPluginBabelHelpers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_rollupPluginBabelHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,72 +8,86 @@ var Socials_module = require('./Socials.module.css.js');
|
|
|
8
8
|
var apple = require('../../assets/apple.svg.js');
|
|
9
9
|
var constants = require('./constants.js');
|
|
10
10
|
|
|
11
|
-
const AppleAuthButton = ({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
setAppleSDKLoaded(true);
|
|
27
|
-
}
|
|
28
|
-
}, []);
|
|
29
|
-
const handleLogin = () => {
|
|
30
|
-
const nonce = utils.bytesToHex(sha2.sha256(iframePublicKey));
|
|
31
|
-
const appleAuthUrl = new URL(constants.APPLE_AUTH_URL);
|
|
32
|
-
appleAuthUrl.searchParams.set("client_id", clientId);
|
|
33
|
-
appleAuthUrl.searchParams.set("redirect_uri", redirectURI);
|
|
34
|
-
appleAuthUrl.searchParams.set("response_type", "code id_token");
|
|
35
|
-
appleAuthUrl.searchParams.set("response_mode", "fragment");
|
|
36
|
-
appleAuthUrl.searchParams.set("nonce", nonce);
|
|
37
|
-
// Calculate popup dimensions and position for centering
|
|
38
|
-
const width = constants.popupWidth;
|
|
39
|
-
const height = constants.popupHeight;
|
|
40
|
-
const left = window.screenX + (window.innerWidth - width) / 2;
|
|
41
|
-
const top = window.screenY + (window.innerHeight - height) / 2;
|
|
42
|
-
// Open the Apple login popup
|
|
43
|
-
const authWindow = window.open(appleAuthUrl.toString(), "_blank", `width=${width},height=${height},top=${top},left=${left},scrollbars=yes,resizable=yes`);
|
|
44
|
-
if (!authWindow) {
|
|
45
|
-
console.error("Failed to open Apple login window.");
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
// Monitor the popup for redirect and extract tokens
|
|
49
|
-
const interval = setInterval(() => {
|
|
50
|
-
try {
|
|
51
|
-
const url = authWindow?.location.href || "";
|
|
52
|
-
if (url.startsWith(window.location.origin)) {
|
|
53
|
-
const hashParams = new URLSearchParams(url.split("#")[1]);
|
|
54
|
-
const idToken = hashParams.get("id_token");
|
|
55
|
-
if (idToken) {
|
|
56
|
-
authWindow?.close();
|
|
57
|
-
clearInterval(interval);
|
|
58
|
-
onSuccess({ idToken });
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
// Ignore cross-origin errors until the popup redirects to the same origin.
|
|
64
|
-
// These errors occur because the script attempts to access the URL of the popup window while it's on a different domain.
|
|
65
|
-
// Due to browser security policies (Same-Origin Policy), accessing properties like location.href on a window that is on a different domain will throw an exception.
|
|
66
|
-
// Once the popup redirects to the same origin as the parent window, these errors will no longer occur, and the script can safely access the popup's location to extract parameters.
|
|
67
|
-
}
|
|
68
|
-
if (authWindow?.closed) {
|
|
69
|
-
clearInterval(interval);
|
|
70
|
-
}
|
|
71
|
-
}, 500);
|
|
11
|
+
const AppleAuthButton = ({
|
|
12
|
+
iframePublicKey,
|
|
13
|
+
onSuccess,
|
|
14
|
+
clientId,
|
|
15
|
+
layout
|
|
16
|
+
}) => {
|
|
17
|
+
const [appleSDKLoaded, setAppleSDKLoaded] = React.useState(false);
|
|
18
|
+
const redirectURI = process.env.NEXT_PUBLIC_OAUTH_REDIRECT_URI;
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
const loadAppleSDK = () => {
|
|
21
|
+
const script = document.createElement("script");
|
|
22
|
+
script.src = constants.APPLE_AUTH_SCRIPT_URL;
|
|
23
|
+
script.onload = () => setAppleSDKLoaded(true);
|
|
24
|
+
script.onerror = () => console.error("Failed to load AppleID SDK");
|
|
25
|
+
document.body.appendChild(script);
|
|
72
26
|
};
|
|
73
|
-
if (!
|
|
74
|
-
|
|
27
|
+
if (!window.AppleID) {
|
|
28
|
+
loadAppleSDK();
|
|
29
|
+
} else {
|
|
30
|
+
setAppleSDKLoaded(true);
|
|
75
31
|
}
|
|
76
|
-
|
|
32
|
+
}, []);
|
|
33
|
+
const handleLogin = () => {
|
|
34
|
+
const nonce = utils.bytesToHex(sha2.sha256(iframePublicKey));
|
|
35
|
+
const appleAuthUrl = new URL(constants.APPLE_AUTH_URL);
|
|
36
|
+
appleAuthUrl.searchParams.set("client_id", clientId);
|
|
37
|
+
appleAuthUrl.searchParams.set("redirect_uri", redirectURI);
|
|
38
|
+
appleAuthUrl.searchParams.set("response_type", "code id_token");
|
|
39
|
+
appleAuthUrl.searchParams.set("response_mode", "fragment");
|
|
40
|
+
appleAuthUrl.searchParams.set("nonce", nonce);
|
|
41
|
+
// Calculate popup dimensions and position for centering
|
|
42
|
+
const width = constants.popupWidth;
|
|
43
|
+
const height = constants.popupHeight;
|
|
44
|
+
const left = window.screenX + (window.innerWidth - width) / 2;
|
|
45
|
+
const top = window.screenY + (window.innerHeight - height) / 2;
|
|
46
|
+
// Open the Apple login popup
|
|
47
|
+
const authWindow = window.open(appleAuthUrl.toString(), "_blank", `width=${width},height=${height},top=${top},left=${left},scrollbars=yes,resizable=yes`);
|
|
48
|
+
if (!authWindow) {
|
|
49
|
+
console.error("Failed to open Apple login window.");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
// Monitor the popup for redirect and extract tokens
|
|
53
|
+
const interval = setInterval(() => {
|
|
54
|
+
try {
|
|
55
|
+
const url = authWindow?.location.href || "";
|
|
56
|
+
if (url.startsWith(window.location.origin)) {
|
|
57
|
+
const hashParams = new URLSearchParams(url.split("#")[1]);
|
|
58
|
+
const idToken = hashParams.get("id_token");
|
|
59
|
+
if (idToken) {
|
|
60
|
+
authWindow?.close();
|
|
61
|
+
clearInterval(interval);
|
|
62
|
+
onSuccess({
|
|
63
|
+
idToken
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
} catch (error) {
|
|
68
|
+
// Ignore cross-origin errors until the popup redirects to the same origin.
|
|
69
|
+
// These errors occur because the script attempts to access the URL of the popup window while it's on a different domain.
|
|
70
|
+
// Due to browser security policies (Same-Origin Policy), accessing properties like location.href on a window that is on a different domain will throw an exception.
|
|
71
|
+
// Once the popup redirects to the same origin as the parent window, these errors will no longer occur, and the script can safely access the popup's location to extract parameters.
|
|
72
|
+
}
|
|
73
|
+
if (authWindow?.closed) {
|
|
74
|
+
clearInterval(interval);
|
|
75
|
+
}
|
|
76
|
+
}, 500);
|
|
77
|
+
};
|
|
78
|
+
if (!appleSDKLoaded) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return jsxRuntime.jsxs("div", {
|
|
82
|
+
onClick: handleLogin,
|
|
83
|
+
className: layout === "inline" ? Socials_module.iconButton : Socials_module.socialButton,
|
|
84
|
+
children: [jsxRuntime.jsx("img", {
|
|
85
|
+
src: apple,
|
|
86
|
+
className: layout === "inline" ? Socials_module.iconLarge : Socials_module.iconSmall
|
|
87
|
+
}), layout === "stacked" && jsxRuntime.jsx("span", {
|
|
88
|
+
children: "Continue with Apple"
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
77
91
|
};
|
|
78
92
|
|
|
79
93
|
module.exports = AppleAuthButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Apple.js","sources":["../../../src/components/auth/Apple.tsx"],"sourcesContent":[null],"names":["useState","useEffect","APPLE_AUTH_SCRIPT_URL","bytesToHex","sha256","APPLE_AUTH_URL","popupWidth","popupHeight","_jsxs","styles","_jsx","appleIcon"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Apple.js","sources":["../../../src/components/auth/Apple.tsx"],"sourcesContent":[null],"names":["AppleAuthButton","iframePublicKey","onSuccess","clientId","layout","appleSDKLoaded","setAppleSDKLoaded","useState","redirectURI","process","env","NEXT_PUBLIC_OAUTH_REDIRECT_URI","useEffect","loadAppleSDK","script","document","createElement","src","APPLE_AUTH_SCRIPT_URL","onload","onerror","console","error","body","appendChild","window","AppleID","handleLogin","nonce","bytesToHex","sha256","appleAuthUrl","URL","APPLE_AUTH_URL","searchParams","set","width","popupWidth","height","popupHeight","left","screenX","innerWidth","top","screenY","innerHeight","authWindow","open","toString","interval","setInterval","url","location","href","startsWith","origin","hashParams","URLSearchParams","split","idToken","get","close","clearInterval","closed","_jsxs","onClick","className","styles","iconButton","socialButton","children","_jsx","appleIcon","iconLarge","iconSmall"],"mappings":";;;;;;;;;;AAwBMA,MAAAA,eAAe,GAAmCA,CAAC;EACvDC,eAAe;EACfC,SAAS;EACTC,QAAQ;AACRC,EAAAA,MAAAA;AAAM,CACP,KAAI;EACH,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAGC,cAAQ,CAAC,KAAK,CAAC,CAAA;AAC3D,EAAA,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACC,8BAA+B,CAAA;AAE/DC,EAAAA,eAAS,CAAC,MAAK;IACb,MAAMC,YAAY,GAAGA,MAAK;AACxB,MAAA,MAAMC,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC,CAAA;MAC/CF,MAAM,CAACG,GAAG,GAAGC,+BAAqB,CAAA;AAClCJ,MAAAA,MAAM,CAACK,MAAM,GAAG,MAAMb,iBAAiB,CAAC,IAAI,CAAC,CAAA;MAC7CQ,MAAM,CAACM,OAAO,GAAG,MAAMC,OAAO,CAACC,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAClEP,MAAAA,QAAQ,CAACQ,IAAI,CAACC,WAAW,CAACV,MAAM,CAAC,CAAA;KAClC,CAAA;AAED,IAAA,IAAI,CAACW,MAAM,CAACC,OAAO,EAAE;AACnBb,MAAAA,YAAY,EAAE,CAAA;AACf,KAAA,MAAM;MACLP,iBA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