@springmicro/auth 0.7.16 → 0.7.20
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/{Index-1e31d199-CO-3sUD-.js → Index-1e31d199-BXGGyb0l.js} +48 -48
- package/dist/{Index-6078f122-CDowfR7U.js → Index-6078f122-DGZJdnAZ.js} +67 -67
- package/dist/{Web3Auth-C1gorwXx.js → Web3Auth-DG8Yz_cD.js} +5884 -5161
- package/dist/{ccip-c78d2f16-DUJGUJJo.js → ccip-c78d2f16-BfTJLflq.js} +2 -2
- package/dist/{hmac-CGR-aDxj.js → hmac-CW2mnXa8.js} +1 -1
- package/dist/{index-021f6a62-DBObZnNM.js → index-021f6a62-CxfpndDE.js} +32 -32
- package/dist/{index-40a497ea-BEwImqwN.js → index-40a497ea-BRLn4BDo.js} +3 -3
- package/dist/index-B51q7F_W.js +9742 -0
- package/dist/{index-cTAxNlZn.js → index-BXvsDp0W.js} +582 -584
- package/dist/{index-D0GY6Fny.js → index-BYJic99M.js} +1400 -1751
- package/dist/{index-DJiTRo2_.js → index-Bfb6JoQf.js} +9082 -8717
- package/dist/{index-BIEw47XG.js → index-C8R4klyg.js} +27 -27
- package/dist/{index-ClXLxv7Y.js → index-CBbDq4vF.js} +3310 -3294
- package/dist/{index-C2J9ZZ0N.js → index-DbQi7wFl.js} +26 -26
- package/dist/index-hDobpv7u.js +32 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +297 -298
- package/dist/native-FDN9oNjc.js +15 -0
- package/dist/{number-9K9sKV6s.js → number-DvQcSzeP.js} +556 -335
- package/dist/parseEther-C7cmMVOE.js +24 -0
- package/dist/{sha256-JJGtJ2gn.js → sha256-C90UGNQg.js} +8 -7
- package/dist/{transactionRequest-be6a8ea9-_q5BIZxq.js → transactionRequest-be6a8ea9-CCwC71wa.js} +9 -9
- package/package.json +4 -4
- package/src/components/SignUp.tsx +19 -19
- package/src/components/forms/CaptchaController.tsx +2 -2
- package/dist/index-BLh7Sl_6.js +0 -6151
- package/dist/index-bH4yLInF.js +0 -29
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { C as g } from "./Web3Auth-DG8Yz_cD.js";
|
|
2
|
+
function u(i, n) {
|
|
3
|
+
let [e, t = "0"] = i.split(".");
|
|
4
|
+
const s = e.startsWith("-");
|
|
5
|
+
if (s && (e = e.slice(1)), t = t.replace(/(0+)$/, ""), n === 0)
|
|
6
|
+
Math.round(+`.${t}`) === 1 && (e = `${BigInt(e) + 1n}`), t = "";
|
|
7
|
+
else if (t.length > n) {
|
|
8
|
+
const [r, $, f] = [
|
|
9
|
+
t.slice(0, n - 1),
|
|
10
|
+
t.slice(n - 1, n),
|
|
11
|
+
t.slice(n)
|
|
12
|
+
], o = Math.round(+`${$}.${f}`);
|
|
13
|
+
o > 9 ? t = `${BigInt(r) + BigInt(1)}0`.padStart(r.length + 1, "0") : t = `${r}${o}`, t.length > n && (t = t.slice(1), e = `${BigInt(e) + 1n}`), t = t.slice(0, n);
|
|
14
|
+
} else
|
|
15
|
+
t = t.padEnd(n, "0");
|
|
16
|
+
return BigInt(`${s ? "-" : ""}${e}${t}`);
|
|
17
|
+
}
|
|
18
|
+
function p(i, n = "wei") {
|
|
19
|
+
return u(i, g[n]);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
p as a,
|
|
23
|
+
u as p
|
|
24
|
+
};
|
|
@@ -64,13 +64,13 @@ async function V(t, e, s) {
|
|
|
64
64
|
i >= 0 && i < e || (await H(), n += i);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function S(t) {
|
|
68
68
|
if (typeof t != "string")
|
|
69
69
|
throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
|
|
70
70
|
return new Uint8Array(new TextEncoder().encode(t));
|
|
71
71
|
}
|
|
72
72
|
function g(t) {
|
|
73
|
-
if (typeof t == "string" && (t =
|
|
73
|
+
if (typeof t == "string" && (t = S(t)), !E(t))
|
|
74
74
|
throw new Error(`expected Uint8Array, got ${typeof t}`);
|
|
75
75
|
return t;
|
|
76
76
|
}
|
|
@@ -83,7 +83,7 @@ function $(...t) {
|
|
|
83
83
|
e.set(n, s), s += n.length;
|
|
84
84
|
}), e;
|
|
85
85
|
}
|
|
86
|
-
class
|
|
86
|
+
class O {
|
|
87
87
|
// Safe version that clones internal state
|
|
88
88
|
clone() {
|
|
89
89
|
return this._cloneInto();
|
|
@@ -114,7 +114,7 @@ function R(t = 32) {
|
|
|
114
114
|
}
|
|
115
115
|
const tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
116
116
|
__proto__: null,
|
|
117
|
-
Hash:
|
|
117
|
+
Hash: O,
|
|
118
118
|
asyncLoop: V,
|
|
119
119
|
bytesToHex: N,
|
|
120
120
|
checkOpts: W,
|
|
@@ -128,7 +128,7 @@ const tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
128
128
|
toBytes: g,
|
|
129
129
|
u32: C,
|
|
130
130
|
u8: j,
|
|
131
|
-
utf8ToBytes:
|
|
131
|
+
utf8ToBytes: S,
|
|
132
132
|
wrapConstructor: L,
|
|
133
133
|
wrapConstructorWithOpts: M,
|
|
134
134
|
wrapXOFConstructorWithOpts: v
|
|
@@ -139,7 +139,7 @@ function z(t, e, s, n) {
|
|
|
139
139
|
const o = BigInt(32), i = BigInt(4294967295), r = Number(s >> o & i), f = Number(s & i), h = n ? 4 : 0, a = n ? 0 : 4;
|
|
140
140
|
t.setUint32(e + h, r, n), t.setUint32(e + a, f, n);
|
|
141
141
|
}
|
|
142
|
-
class P extends
|
|
142
|
+
class P extends O {
|
|
143
143
|
constructor(e, s, n, o) {
|
|
144
144
|
super(), this.blockLen = e, this.outputLen = s, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view = w(this.buffer);
|
|
145
145
|
}
|
|
@@ -308,7 +308,8 @@ const Q = /* @__PURE__ */ L(() => new k()), Y = /* @__PURE__ */ L(() => new J())
|
|
|
308
308
|
sha256: Q
|
|
309
309
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
310
310
|
export {
|
|
311
|
-
|
|
311
|
+
O as H,
|
|
312
|
+
P as S,
|
|
312
313
|
et as a,
|
|
313
314
|
T as b,
|
|
314
315
|
$ as c,
|
package/dist/{transactionRequest-be6a8ea9-_q5BIZxq.js → transactionRequest-be6a8ea9-CCwC71wa.js}
RENAMED
|
@@ -1058,13 +1058,13 @@ export {
|
|
|
1058
1058
|
a as B,
|
|
1059
1059
|
$t as C,
|
|
1060
1060
|
vt as D,
|
|
1061
|
-
|
|
1061
|
+
yt as E,
|
|
1062
1062
|
De as F,
|
|
1063
|
-
|
|
1063
|
+
pt as G,
|
|
1064
1064
|
ve as H,
|
|
1065
1065
|
lt as I,
|
|
1066
|
-
|
|
1067
|
-
|
|
1066
|
+
M as J,
|
|
1067
|
+
Se as K,
|
|
1068
1068
|
_ as L,
|
|
1069
1069
|
Xe as M,
|
|
1070
1070
|
We as N,
|
|
@@ -1085,9 +1085,9 @@ export {
|
|
|
1085
1085
|
q as a0,
|
|
1086
1086
|
ne as a1,
|
|
1087
1087
|
se as a2,
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1088
|
+
g as a3,
|
|
1089
|
+
ot as a4,
|
|
1090
|
+
it as a5,
|
|
1091
1091
|
mt as a6,
|
|
1092
1092
|
gt as b,
|
|
1093
1093
|
Re as c,
|
|
@@ -1102,8 +1102,8 @@ export {
|
|
|
1102
1102
|
at as l,
|
|
1103
1103
|
It as m,
|
|
1104
1104
|
k as n,
|
|
1105
|
-
|
|
1106
|
-
|
|
1105
|
+
P as o,
|
|
1106
|
+
ae as p,
|
|
1107
1107
|
ht as q,
|
|
1108
1108
|
L as r,
|
|
1109
1109
|
b as s,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springmicro/auth",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"preview": "vite preview"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"react": "^
|
|
20
|
-
"react-dom": "^
|
|
19
|
+
"react": "^19.2.4",
|
|
20
|
+
"react-dom": "^19.2.4"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^20.14.9",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"react-social-login-buttons": "^4.1.0",
|
|
54
54
|
"uuid": "^9.0.1"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "17216b9fa5725017f185d210dc57dca36e02f43c"
|
|
57
57
|
}
|
|
@@ -86,7 +86,7 @@ function SignUpForm(props: SignUpFormProps) {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
onUpdateApplication(res.data);
|
|
89
|
-
}
|
|
89
|
+
},
|
|
90
90
|
);
|
|
91
91
|
};
|
|
92
92
|
const getApplicationLogin = (oAuthParams: any) => {
|
|
@@ -110,7 +110,7 @@ function SignUpForm(props: SignUpFormProps) {
|
|
|
110
110
|
|
|
111
111
|
const getInvitationCodeInfo = (
|
|
112
112
|
invitationCode: string,
|
|
113
|
-
application: string
|
|
113
|
+
application: string,
|
|
114
114
|
) => {
|
|
115
115
|
InvitationBackend.getInvitationCodeInfo(invitationCode, application).then(
|
|
116
116
|
(res: any) => {
|
|
@@ -119,7 +119,7 @@ function SignUpForm(props: SignUpFormProps) {
|
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
setState({ ...state, invitation: res.data });
|
|
122
|
-
}
|
|
122
|
+
},
|
|
123
123
|
);
|
|
124
124
|
};
|
|
125
125
|
|
|
@@ -136,7 +136,7 @@ function SignUpForm(props: SignUpFormProps) {
|
|
|
136
136
|
if (oAuthParams !== null) {
|
|
137
137
|
const signinUrl = window.location.pathname.replace(
|
|
138
138
|
"/signup/oauth/authorize",
|
|
139
|
-
"/login/oauth/authorize"
|
|
139
|
+
"/login/oauth/authorize",
|
|
140
140
|
);
|
|
141
141
|
sessionStorage.setItem("signinUrl", signinUrl + window.location.search);
|
|
142
142
|
}
|
|
@@ -152,7 +152,7 @@ function SignUpForm(props: SignUpFormProps) {
|
|
|
152
152
|
if (invitationCode !== "") {
|
|
153
153
|
getInvitationCodeInfo(
|
|
154
154
|
invitationCode,
|
|
155
|
-
"admin/" + state.applicationName
|
|
155
|
+
"admin/" + state.applicationName,
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -161,7 +161,7 @@ function SignUpForm(props: SignUpFormProps) {
|
|
|
161
161
|
} else {
|
|
162
162
|
Setting.showMessage(
|
|
163
163
|
"error",
|
|
164
|
-
`Unknown application name: ${state.applicationName}
|
|
164
|
+
`Unknown application name: ${state.applicationName}`,
|
|
165
165
|
);
|
|
166
166
|
onUpdateApplication(null);
|
|
167
167
|
}
|
|
@@ -206,7 +206,7 @@ export function SignUp({
|
|
|
206
206
|
const getApplication = () => {
|
|
207
207
|
ApplicationBackend.getApplication("admin", applicationName).then(
|
|
208
208
|
(res: any) => {
|
|
209
|
-
console.log(res);
|
|
209
|
+
// console.log(res);
|
|
210
210
|
if (res.status === "error") {
|
|
211
211
|
Setting.showMessage("error", res.msg);
|
|
212
212
|
return;
|
|
@@ -215,7 +215,7 @@ export function SignUp({
|
|
|
215
215
|
setState({
|
|
216
216
|
application: res.data,
|
|
217
217
|
});
|
|
218
|
-
}
|
|
218
|
+
},
|
|
219
219
|
);
|
|
220
220
|
};
|
|
221
221
|
|
|
@@ -245,7 +245,7 @@ interface SignUpContextType {
|
|
|
245
245
|
getFormProps: typeof getFormProps;
|
|
246
246
|
icon: (
|
|
247
247
|
signupItem: SignupItem,
|
|
248
|
-
Button: React.JSX.ElementType
|
|
248
|
+
Button: React.JSX.ElementType,
|
|
249
249
|
) => React.JSX.Element | null;
|
|
250
250
|
getZod: typeof getZod;
|
|
251
251
|
getKey: typeof getKey;
|
|
@@ -258,7 +258,7 @@ interface SignUpContextType {
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
const SignUpContext = React.createContext<SignUpContextType | undefined>(
|
|
261
|
-
undefined
|
|
261
|
+
undefined,
|
|
262
262
|
);
|
|
263
263
|
|
|
264
264
|
export function SignUpProvider({
|
|
@@ -281,7 +281,7 @@ export function SignUpProvider({
|
|
|
281
281
|
const getApplication = () => {
|
|
282
282
|
ApplicationBackend.getApplication("admin", applicationName).then(
|
|
283
283
|
(res: any) => {
|
|
284
|
-
console.log(res);
|
|
284
|
+
// console.log(res);
|
|
285
285
|
if (res.status === "error") {
|
|
286
286
|
Setting.showMessage("error", res.msg);
|
|
287
287
|
return;
|
|
@@ -290,7 +290,7 @@ export function SignUpProvider({
|
|
|
290
290
|
setState({
|
|
291
291
|
application: res.data,
|
|
292
292
|
});
|
|
293
|
-
}
|
|
293
|
+
},
|
|
294
294
|
);
|
|
295
295
|
};
|
|
296
296
|
|
|
@@ -302,7 +302,7 @@ export function SignUpProvider({
|
|
|
302
302
|
|
|
303
303
|
const getInvitationCodeInfo = (
|
|
304
304
|
invitationCode: string,
|
|
305
|
-
application: string
|
|
305
|
+
application: string,
|
|
306
306
|
) => {
|
|
307
307
|
InvitationBackend.getInvitationCodeInfo(invitationCode, application).then(
|
|
308
308
|
(res: any) => {
|
|
@@ -311,7 +311,7 @@ export function SignUpProvider({
|
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
313
|
setState({ ...state, invitation: res.data });
|
|
314
|
-
}
|
|
314
|
+
},
|
|
315
315
|
);
|
|
316
316
|
};
|
|
317
317
|
|
|
@@ -339,7 +339,7 @@ export function SignUpProvider({
|
|
|
339
339
|
setState: setTogglePasswordVisibility,
|
|
340
340
|
},
|
|
341
341
|
},
|
|
342
|
-
Button
|
|
342
|
+
Button,
|
|
343
343
|
);
|
|
344
344
|
};
|
|
345
345
|
|
|
@@ -360,7 +360,7 @@ export function SignUpProvider({
|
|
|
360
360
|
React.useEffect(() => {
|
|
361
361
|
if (state.application) {
|
|
362
362
|
setTogglePasswordVisibility(
|
|
363
|
-
getPasswordVisibilityRecord(state.application.signupItems)
|
|
363
|
+
getPasswordVisibilityRecord(state.application.signupItems),
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
366
|
}, [state.application]);
|
|
@@ -370,7 +370,7 @@ export function SignUpProvider({
|
|
|
370
370
|
if (oAuthParams !== null) {
|
|
371
371
|
const signinUrl = window.location.pathname.replace(
|
|
372
372
|
"/signup/oauth/authorize",
|
|
373
|
-
"/login/oauth/authorize"
|
|
373
|
+
"/login/oauth/authorize",
|
|
374
374
|
);
|
|
375
375
|
sessionStorage.setItem("signinUrl", signinUrl + window.location.search);
|
|
376
376
|
}
|
|
@@ -386,7 +386,7 @@ export function SignUpProvider({
|
|
|
386
386
|
if (invitationCode !== "") {
|
|
387
387
|
getInvitationCodeInfo(
|
|
388
388
|
invitationCode,
|
|
389
|
-
"admin/" + state.applicationName
|
|
389
|
+
"admin/" + state.applicationName,
|
|
390
390
|
);
|
|
391
391
|
}
|
|
392
392
|
}
|
|
@@ -395,7 +395,7 @@ export function SignUpProvider({
|
|
|
395
395
|
} else {
|
|
396
396
|
Setting.showMessage(
|
|
397
397
|
"error",
|
|
398
|
-
`Unknown application name: ${state.applicationName}
|
|
398
|
+
`Unknown application name: ${state.applicationName}`,
|
|
399
399
|
);
|
|
400
400
|
onUpdateApplication(null);
|
|
401
401
|
}
|
|
@@ -28,13 +28,13 @@ export default function CaptchaController() {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
const captchaCallback = (v: any) => {
|
|
31
|
-
console.log(v);
|
|
31
|
+
// console.log(v);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
const onOk = (
|
|
35
35
|
captchaType: string,
|
|
36
36
|
captchaToken: string,
|
|
37
|
-
clientSecret: string
|
|
37
|
+
clientSecret: string,
|
|
38
38
|
) => {
|
|
39
39
|
if (dialogRef.current) {
|
|
40
40
|
// @ts-ignore
|