@springmicro/auth 0.7.4 → 0.7.6

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.
Files changed (45) hide show
  1. package/README.md +60 -60
  2. package/package.json +2 -2
  3. package/src/components/forms/AgreementModal.tsx +88 -88
  4. package/src/components/forms/CaptchaController.tsx +94 -94
  5. package/src/components/forms/CaptchaModal.jsx +171 -171
  6. package/src/components/forms/CaptchaWidget.jsx +146 -146
  7. package/src/components/forms/PasswordChecker.ts +88 -88
  8. package/src/components/forms/util/auth-api.ts +198 -198
  9. package/src/components/forms/util/auth-util.tsx +346 -346
  10. package/src/components/forms/util/core.ts +493 -493
  11. package/src/components/forms/util/invitation-api.ts +132 -132
  12. package/src/components/forms/util/provider.tsx +603 -603
  13. package/src/components/provider/AdfsLoginButton.jsx +38 -38
  14. package/src/components/provider/AlipayLoginButton.jsx +38 -38
  15. package/src/components/provider/AppleLoginButton.jsx +38 -38
  16. package/src/components/provider/AzureADB2CLoginButton.jsx +38 -38
  17. package/src/components/provider/AzureADLoginButton.jsx +38 -38
  18. package/src/components/provider/BaiduLoginButton.jsx +38 -38
  19. package/src/components/provider/BilibiliLoginButton.jsx +37 -37
  20. package/src/components/provider/CasdoorLoginButton.jsx +38 -38
  21. package/src/components/provider/DingTalkLoginButton.jsx +37 -37
  22. package/src/components/provider/DouyinLoginButton.jsx +38 -38
  23. package/src/components/provider/FacebookLoginButton.jsx +37 -37
  24. package/src/components/provider/GitHubLoginButton.jsx +37 -37
  25. package/src/components/provider/GitLabLoginButton.jsx +38 -38
  26. package/src/components/provider/GiteeLoginButton.jsx +34 -34
  27. package/src/components/provider/GoogleLoginButton.jsx +68 -68
  28. package/src/components/provider/InfoflowLoginButton.jsx +38 -38
  29. package/src/components/provider/LarkLoginButton.jsx +38 -38
  30. package/src/components/provider/LinkedInLoginButton.jsx +37 -37
  31. package/src/components/provider/LoginButton.jsx +33 -33
  32. package/src/components/provider/OktaLoginButton.jsx +38 -38
  33. package/src/components/provider/Provider.jsx +3 -3
  34. package/src/components/provider/ProviderButton.jsx +327 -327
  35. package/src/components/provider/QqLoginButton.jsx +31 -31
  36. package/src/components/provider/SelfLoginButton.jsx +47 -47
  37. package/src/components/provider/SlackLoginButton.jsx +38 -38
  38. package/src/components/provider/SteamLoginButton.jsx +38 -38
  39. package/src/components/provider/WeComLoginButton.jsx +34 -34
  40. package/src/components/provider/Web3Auth.jsx +365 -365
  41. package/src/components/provider/WechatLoginButton.jsx +37 -37
  42. package/src/components/provider/WeiboLoginButton.jsx +34 -34
  43. package/src/i18n/en/signup.json +48 -48
  44. package/src/i18n/index.ts +17 -17
  45. package/vite.config.ts +33 -33
@@ -1,38 +1,38 @@
1
- // Copyright 2022 The Casdoor Authors. All Rights Reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- import { createButton } from "react-social-login-buttons";
16
- import { StaticBaseUrl } from "../forms/util/core";
17
-
18
- function Icon({ width = 24, height = 24, color }) {
19
- return (
20
- <img
21
- src={`${StaticBaseUrl}/buttons/infoflow.svg`}
22
- alt="Sign in with Infoflow"
23
- style={{ width: 24, height: 24 }}
24
- />
25
- );
26
- }
27
-
28
- const config = {
29
- text: "Sign in with Infoflow",
30
- icon: Icon,
31
- iconFormat: (name) => `fa fa-${name}`,
32
- style: { background: "#ffffff", color: "#000000" },
33
- activeStyle: { background: "#ededee" },
34
- };
35
-
36
- const InfoflowLoginButton = createButton(config);
37
-
38
- export default InfoflowLoginButton;
1
+ // Copyright 2022 The Casdoor Authors. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import { createButton } from "react-social-login-buttons";
16
+ import { StaticBaseUrl } from "../forms/util/core";
17
+
18
+ function Icon({ width = 24, height = 24, color }) {
19
+ return (
20
+ <img
21
+ src={`${StaticBaseUrl}/buttons/infoflow.svg`}
22
+ alt="Sign in with Infoflow"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Infoflow",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const InfoflowLoginButton = createButton(config);
37
+
38
+ export default InfoflowLoginButton;
@@ -1,38 +1,38 @@
1
- // Copyright 2021 The Casdoor Authors. All Rights Reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- import { createButton } from "react-social-login-buttons";
16
- import { StaticBaseUrl } from "../forms/util/core";
17
-
18
- function Icon({ width = 24, height = 24, color }) {
19
- return (
20
- <img
21
- src={`${StaticBaseUrl}/buttons/lark.svg`}
22
- alt="Sign in with Lark"
23
- style={{ width: 24, height: 24 }}
24
- />
25
- );
26
- }
27
-
28
- const config = {
29
- text: "Sign in with Lark",
30
- icon: Icon,
31
- iconFormat: (name) => `fa fa-${name}`,
32
- style: { background: "#ffffff", color: "#000000" },
33
- activeStyle: { background: "#ededee" },
34
- };
35
-
36
- const LarkLoginButton = createButton(config);
37
-
38
- export default LarkLoginButton;
1
+ // Copyright 2021 The Casdoor Authors. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import { createButton } from "react-social-login-buttons";
16
+ import { StaticBaseUrl } from "../forms/util/core";
17
+
18
+ function Icon({ width = 24, height = 24, color }) {
19
+ return (
20
+ <img
21
+ src={`${StaticBaseUrl}/buttons/lark.svg`}
22
+ alt="Sign in with Lark"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Lark",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const LarkLoginButton = createButton(config);
37
+
38
+ export default LarkLoginButton;
@@ -1,37 +1,37 @@
1
- // Copyright 2021 The Casdoor Authors. All Rights Reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- import { createButton } from "react-social-login-buttons";
16
- import { StaticBaseUrl } from "../forms/util/core";
17
-
18
- function Icon({ width = 24, height = 24, color }) {
19
- return (
20
- <img
21
- src={`${StaticBaseUrl}/buttons/linkedin.svg`}
22
- alt="Sign in with LinkedIn"
23
- />
24
- );
25
- }
26
-
27
- const config = {
28
- text: "Sign in with LinkedIn",
29
- icon: Icon,
30
- iconFormat: (name) => `fa fa-${name}`,
31
- style: { background: "rgb(255,255,255)", color: "#000000" },
32
- activeStyle: { background: "rgb(240,240,250)" },
33
- };
34
-
35
- const LinkedInLoginButton = createButton(config);
36
-
37
- export default LinkedInLoginButton;
1
+ // Copyright 2021 The Casdoor Authors. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import { createButton } from "react-social-login-buttons";
16
+ import { StaticBaseUrl } from "../forms/util/core";
17
+
18
+ function Icon({ width = 24, height = 24, color }) {
19
+ return (
20
+ <img
21
+ src={`${StaticBaseUrl}/buttons/linkedin.svg`}
22
+ alt="Sign in with LinkedIn"
23
+ />
24
+ );
25
+ }
26
+
27
+ const config = {
28
+ text: "Sign in with LinkedIn",
29
+ icon: Icon,
30
+ iconFormat: (name) => `fa fa-${name}`,
31
+ style: { background: "rgb(255,255,255)", color: "#000000" },
32
+ activeStyle: { background: "rgb(240,240,250)" },
33
+ };
34
+
35
+ const LinkedInLoginButton = createButton(config);
36
+
37
+ export default LinkedInLoginButton;
@@ -1,33 +1,33 @@
1
- // Copyright 2023 The Casdoor Authors. All Rights Reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- import i18next from "i18next";
16
- import {createButton} from "react-social-login-buttons";
17
-
18
- function LoginButton({type, logoUrl, align = "center", style = {background: "#ffffff", color: "#000000"}, activeStyle = {background: "#ededee"}}) {
19
- function Icon({width = 24, height = 24, color}) {
20
- return <img src={logoUrl} alt={`Sign in with ${type}`} style={{width: width, height: height}} />;
21
- }
22
- const config = {
23
- text: `Sign in with ${type}`,
24
- icon: Icon,
25
- style: style,
26
- activeStyle: activeStyle,
27
- };
28
- const Button = createButton(config);
29
- const text = i18next.t("login:Sign in with {type}").replace("{type}", type);
30
- return <Button text={text} align={align} />;
31
- }
32
-
33
- export default LoginButton;
1
+ // Copyright 2023 The Casdoor Authors. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import i18next from "i18next";
16
+ import {createButton} from "react-social-login-buttons";
17
+
18
+ function LoginButton({type, logoUrl, align = "center", style = {background: "#ffffff", color: "#000000"}, activeStyle = {background: "#ededee"}}) {
19
+ function Icon({width = 24, height = 24, color}) {
20
+ return <img src={logoUrl} alt={`Sign in with ${type}`} style={{width: width, height: height}} />;
21
+ }
22
+ const config = {
23
+ text: `Sign in with ${type}`,
24
+ icon: Icon,
25
+ style: style,
26
+ activeStyle: activeStyle,
27
+ };
28
+ const Button = createButton(config);
29
+ const text = i18next.t("login:Sign in with {type}").replace("{type}", type);
30
+ return <Button text={text} align={align} />;
31
+ }
32
+
33
+ export default LoginButton;
@@ -1,38 +1,38 @@
1
- // Copyright 2022 The Casdoor Authors. All Rights Reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- import { createButton } from "react-social-login-buttons";
16
- import { StaticBaseUrl } from "../forms/util/core";
17
-
18
- function Icon({ width = 24, height = 24, color }) {
19
- return (
20
- <img
21
- src={`${StaticBaseUrl}/buttons/okta.svg`}
22
- alt="Sign in with Okta"
23
- style={{ width: 24, height: 24 }}
24
- />
25
- );
26
- }
27
-
28
- const config = {
29
- text: "Sign in with Okta",
30
- icon: Icon,
31
- iconFormat: (name) => `fa fa-${name}`,
32
- style: { background: "#ffffff", color: "#000000" },
33
- activeStyle: { background: "#ededee" },
34
- };
35
-
36
- const OktaLoginButton = createButton(config);
37
-
38
- export default OktaLoginButton;
1
+ // Copyright 2022 The Casdoor Authors. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import { createButton } from "react-social-login-buttons";
16
+ import { StaticBaseUrl } from "../forms/util/core";
17
+
18
+ function Icon({ width = 24, height = 24, color }) {
19
+ return (
20
+ <img
21
+ src={`${StaticBaseUrl}/buttons/okta.svg`}
22
+ alt="Sign in with Okta"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Okta",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const OktaLoginButton = createButton(config);
37
+
38
+ export default OktaLoginButton;
@@ -1,3 +1,3 @@
1
- import * as Provider from "../forms/util/provider";
2
-
3
- export { Provider };
1
+ import * as Provider from "../forms/util/provider";
2
+
3
+ export { Provider };