@springmicro/auth 0.5.11 → 0.5.12
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-64ac63ff-BGS59mw0.js → Index-64ac63ff-CDvYyNvy.js} +1 -1
- package/dist/{Index-6c094240-CnaESKOY.js → Index-6c094240-BiBrljFo.js} +1 -1
- package/dist/{Web3Auth-ChSAJPxI.js → Web3Auth-CHWXCVPH.js} +10 -10
- package/dist/{hashMessage-rOprDzE5.js → hashMessage-COHdRaOr.js} +1 -1
- package/dist/{index-Ds7h1tdc.js → index-BU4Qu1YW.js} +2 -2
- package/dist/{index-Dsm6AJMg.js → index-CF2CNb4_.js} +4 -4
- package/dist/{index-B5_AG6rH.js → index-CHUlH-AY.js} +1 -1
- package/dist/{index-DJQLYJLq.js → index-CR1JK6W7.js} +1 -1
- package/dist/{index-BTEwKHup.js → index-CcJuauVP.js} +2 -2
- package/dist/{index-DY_5IKzq.js → index-DK8KfPUN.js} +1 -1
- package/dist/{index-ecBwof-h.js → index-DRGK_WT6.js} +867 -929
- package/dist/index.d.ts +0 -17
- package/dist/index.js +4 -5
- package/dist/index.umd.cjs +241 -241
- package/dist/{number-BYBmQ7ie.js → number-C9sgwRRs.js} +1 -1
- package/package.json +2 -3
- package/src/auth/config.ts +53 -55
- package/src/components/forms/SignUpFormItem.tsx +2 -2
- package/src/index.tsx +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as D, t as ue, q as h, B as f, o as He, s as I, y as ce, C as ze, u as je, d as P, n as w, f as $, g as U, e as te } from "./Web3Auth-
|
|
1
|
+
import { i as D, t as ue, q as h, B as f, o as He, s as I, y as ce, C as ze, u as je, d as P, n as w, f as $, g as U, e as te } from "./Web3Auth-CHWXCVPH.js";
|
|
2
2
|
function A(e) {
|
|
3
3
|
if (!Number.isSafeInteger(e) || e < 0)
|
|
4
4
|
throw new Error(`Wrong positive integer: ${e}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springmicro/auth",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"@web3-onboard/injected-wallets": "^2.10.16",
|
|
44
44
|
"@web3-onboard/taho": "^2.0.5",
|
|
45
45
|
"@web3-onboard/trust": "^2.0.4",
|
|
46
|
-
"auth-astro": "^4.1.1",
|
|
47
46
|
"buffer": "^6.0.3",
|
|
48
47
|
"i18next": "^23.11.2",
|
|
49
48
|
"i18next-browser-languagedetector": "^7.2.1",
|
|
@@ -53,5 +52,5 @@
|
|
|
53
52
|
"react-social-login-buttons": "^4.1.0",
|
|
54
53
|
"uuid": "^9.0.1"
|
|
55
54
|
},
|
|
56
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "86cb2879dee8b76430d44ae5cc69ef72cbabc55b"
|
|
57
56
|
}
|
package/src/auth/config.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { defineConfig } from "auth-astro";
|
|
2
|
-
|
|
3
1
|
type UserProfile = {
|
|
4
2
|
id: string;
|
|
5
3
|
displayName: string;
|
|
@@ -35,57 +33,57 @@ type AuthConfig = {
|
|
|
35
33
|
}
|
|
36
34
|
* @returns FullAuthConfig
|
|
37
35
|
*/
|
|
38
|
-
const getAuthConfig = ({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}: AuthConfig) =>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
36
|
+
// const getAuthConfig = ({
|
|
37
|
+
// casdoorEndpoint,
|
|
38
|
+
// clientId,
|
|
39
|
+
// clientSecret,
|
|
40
|
+
// }: AuthConfig) =>
|
|
41
|
+
// defineConfig({
|
|
42
|
+
// // Configure one or more authentication providers
|
|
43
|
+
// providers: [
|
|
44
|
+
// {
|
|
45
|
+
// id: "casdoor",
|
|
46
|
+
// name: "SpringMicroHost",
|
|
47
|
+
// type: "oidc",
|
|
48
|
+
// issuer: casdoorEndpoint,
|
|
49
|
+
// authorization: { params: { scope: "openid email profile" } },
|
|
50
|
+
// token: true,
|
|
51
|
+
// checks: ["state"],
|
|
52
|
+
// clientId: clientId,
|
|
53
|
+
// clientSecret: clientSecret,
|
|
54
|
+
// profile(profile: UserProfile) {
|
|
55
|
+
// return {
|
|
56
|
+
// id: profile.id,
|
|
57
|
+
// name: profile.displayName,
|
|
58
|
+
// email: profile.email,
|
|
59
|
+
// username: profile.name ?? profile.email,
|
|
60
|
+
// image: profile.avatar,
|
|
61
|
+
// };
|
|
62
|
+
// },
|
|
63
|
+
// },
|
|
64
|
+
// ],
|
|
65
|
+
// pages: {
|
|
66
|
+
// signIn: "/sign-in",
|
|
67
|
+
// },
|
|
68
|
+
// callbacks: {
|
|
69
|
+
// async jwt({ token, account, user }: NextAuthJWT) {
|
|
70
|
+
// // Persist the OAuth access_token and or the user id to the token right after signin
|
|
71
|
+
// if (account) {
|
|
72
|
+
// token.accessToken = account.access_token ?? "";
|
|
73
|
+
// token.username = user.username;
|
|
74
|
+
// token.id = user.id;
|
|
75
|
+
// }
|
|
76
|
+
// return token;
|
|
77
|
+
// },
|
|
78
|
+
// async session({ session, token, user }: NextAuthSession) {
|
|
79
|
+
// // Send properties to the client, like an access_token and user id from a provider.
|
|
80
|
+
// session.accessToken = token.accessToken;
|
|
81
|
+
// session.user.id = token.id;
|
|
82
|
+
// session.user.username = token.username;
|
|
83
|
+
// // console.log(user, token, session);
|
|
84
|
+
// return session;
|
|
85
|
+
// },
|
|
86
|
+
// },
|
|
87
|
+
// });
|
|
90
88
|
|
|
91
|
-
export default getAuthConfig;
|
|
89
|
+
// export default getAuthConfig;
|
|
@@ -14,7 +14,7 @@ import { SendCodeInput } from "./SendCodeInput";
|
|
|
14
14
|
import * as ProviderButton from "../provider/ProviderButton";
|
|
15
15
|
import * as PasswordChecker from "./PasswordChecker";
|
|
16
16
|
import { AgreementModal } from "./AgreementModal";
|
|
17
|
-
import { signIn } from "auth-astro/client";
|
|
17
|
+
// import { signIn } from "auth-astro/client";
|
|
18
18
|
import { TFunction } from "i18next";
|
|
19
19
|
|
|
20
20
|
type Rule = {
|
|
@@ -143,7 +143,7 @@ const onSubmit = (
|
|
|
143
143
|
});
|
|
144
144
|
} else {
|
|
145
145
|
alert("redirect");
|
|
146
|
-
signIn();
|
|
146
|
+
// signIn();
|
|
147
147
|
// Setting.goToLinkSoft(this, this.getResultPath(application, values));
|
|
148
148
|
}
|
|
149
149
|
} else {
|
package/src/index.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import getAuthConfig from "./auth/config";
|
|
1
|
+
// import getAuthConfig from "./auth/config";
|
|
2
2
|
import { SignUp, useSignUp, SignUpProvider } from "./components/SignUp";
|
|
3
3
|
|
|
4
4
|
// function SignUp() {
|
|
5
5
|
// return <>Sign up</>;
|
|
6
6
|
// }
|
|
7
7
|
|
|
8
|
-
export {
|
|
8
|
+
export { SignUp, useSignUp, SignUpProvider };
|