@springmicro/auth 0.1.9 → 0.2.0-alpha.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.
Files changed (135) hide show
  1. package/dist/Index-652aeb8c-BTQ1rBi7.js +2818 -0
  2. package/dist/Index-c419311f-BOZhAAW3.js +1054 -0
  3. package/dist/Web3Auth-hACKSouN.js +32769 -0
  4. package/dist/alphawallet-B7eovdf-.js +26 -0
  5. package/dist/apexwallet-ysP20G9D.js +93 -0
  6. package/dist/atoken-BBnNTzcz.js +27 -0
  7. package/dist/bifrostwallet-CNNBO92h.js +11 -0
  8. package/dist/binance-DvPgAzCw.js +14 -0
  9. package/dist/bitget-DZOUrwgy.js +4 -0
  10. package/dist/bitpie-C_uxmEzw.js +25 -0
  11. package/dist/bitski-DpzkHNkv.js +4 -0
  12. package/dist/blockwallet-BL69cqkA.js +8 -0
  13. package/dist/brave-DnRzMQYW.js +35 -0
  14. package/dist/ccip-c78d2f16-DLcRlwod.js +165 -0
  15. package/dist/coin98wallet-CkFdOvXt.js +4 -0
  16. package/dist/coinbase-CaGNx5if.js +9 -0
  17. package/dist/core-9rK8tWud.js +7 -0
  18. package/dist/defiwallet-0AsgJBSy.js +10 -0
  19. package/dist/detected-CX_JZaUk.js +6 -0
  20. package/dist/echooo-CmaetT_Z.js +14 -0
  21. package/dist/enkrypt-BibtwvK7.js +20 -0
  22. package/dist/exodus-BxzkDWWP.js +4 -0
  23. package/dist/fordefi-CvKyVwhI.js +6 -0
  24. package/dist/foxwallet-D7c_LDTf.js +4 -0
  25. package/dist/frame-CDfNmjUy.js +7 -0
  26. package/dist/frontier-DqKNSj2z.js +8 -0
  27. package/dist/huobiwallet-CxSwqa5L.js +14 -0
  28. package/dist/hyperpay-nmHE3WqM.js +7 -0
  29. package/dist/icon-2Zqy7pqQ.js +8 -0
  30. package/dist/icon-CGWI1Ies.js +43 -0
  31. package/dist/icon-C_O4nprO.js +9 -0
  32. package/dist/icon-DbgmZCnU.js +9 -0
  33. package/dist/icon-cAd7RhSC.js +9 -0
  34. package/dist/icon-duCa3gfT.js +11 -0
  35. package/dist/imtoken-yENtOTS3.js +17 -0
  36. package/dist/index-021f6a62-Zz543EDB.js +2583 -0
  37. package/dist/index-40a497ea-Bn2mC0r7.js +1010 -0
  38. package/dist/index-BHkXn9Ss.js +4010 -0
  39. package/dist/index-BaYEABY7.js +7089 -0
  40. package/dist/index-BtLU53lm.js +6023 -0
  41. package/dist/index-CynP9H3X.js +6188 -0
  42. package/dist/index-Dg8m-Szw.js +31 -0
  43. package/dist/index-Dt6M8ha9.js +161 -0
  44. package/dist/index-DtJfAdfq.js +5822 -0
  45. package/dist/index-klU8YB0c.js +1983 -0
  46. package/dist/index.d.ts +124 -0
  47. package/dist/index.js +5 -43
  48. package/dist/index.umd.cjs +1937 -1
  49. package/dist/infinitywallet-C8J4FUYw.js +42 -0
  50. package/dist/kayros-AIrUK1za.js +27 -0
  51. package/dist/lif3wallet-C5D6r8pg.js +41 -0
  52. package/dist/liquality-nbCtErVq.js +16 -0
  53. package/dist/mathwallet-CWkivCXo.js +50 -0
  54. package/dist/meetone-kKmvI8md.js +13 -0
  55. package/dist/metamask-BN7yiDV1.js +64 -0
  56. package/dist/mykey-CQZ6UcLH.js +13 -0
  57. package/dist/number-BXHWhlom.js +1529 -0
  58. package/dist/okxwallet-CJLVogh2.js +8 -0
  59. package/dist/oneInch-CciyZ4Pz.js +72 -0
  60. package/dist/onekey-Dal8kYjU.js +9 -0
  61. package/dist/opera-DnKg-TJU.js +24 -0
  62. package/dist/ownbit-BshJUVuW.js +18 -0
  63. package/dist/phantom-CJ8dIcov.js +35 -0
  64. package/dist/rabby-D4thTcd6.js +27 -0
  65. package/dist/rainbow-mXld6yWV.js +69 -0
  66. package/dist/roninwallet-ZyYrd-D1.js +9 -0
  67. package/dist/safeheron-Eg1Jb29V.js +23 -0
  68. package/dist/safepal-DVIKy94N.js +105 -0
  69. package/dist/sequence-BS2IbtDg.js +70 -0
  70. package/dist/stablewallet-jyB079Wb.js +20 -0
  71. package/dist/status-FrAvQjfn.js +4 -0
  72. package/dist/subwallet-DMvFqKyY.js +25 -0
  73. package/dist/talisman-Bp8zUXqB.js +16 -0
  74. package/dist/tallywallet-B4OS9nIr.js +16 -0
  75. package/dist/tokenary-C7jjcbQa.js +18 -0
  76. package/dist/tokenpocket-9ZRPmAFA.js +28 -0
  77. package/dist/tp-V2em5bdl.js +13 -0
  78. package/dist/transactionRequest-be6a8ea9-CUKWo5mx.js +1117 -0
  79. package/dist/trust-gPypS1O7.js +11 -0
  80. package/dist/xdefi-COVIyGz4.js +38 -0
  81. package/dist/zeal-DxHbDqm0.js +9 -0
  82. package/dist/zerion-BfW0UElc.js +8 -0
  83. package/dist/zodiacpilot-CrId6F4w.js +6 -0
  84. package/package.json +35 -15
  85. package/src/auth/config.ts +0 -2
  86. package/src/components/SignUp.tsx +442 -0
  87. package/src/components/forms/AgreementModal.tsx +88 -0
  88. package/src/components/forms/CaptchaController.tsx +94 -0
  89. package/src/components/forms/CaptchaModal.jsx +171 -0
  90. package/src/components/forms/CaptchaWidget.jsx +146 -0
  91. package/src/components/forms/PasswordChecker.ts +88 -0
  92. package/src/components/forms/SendCodeInput.tsx +149 -0
  93. package/src/components/forms/SignUpFormItem.tsx +704 -0
  94. package/src/components/forms/util/application-api.ts +155 -0
  95. package/src/components/forms/util/auth-api.ts +198 -0
  96. package/src/components/forms/util/auth-util.tsx +346 -0
  97. package/src/components/forms/util/core.ts +493 -0
  98. package/src/components/forms/util/invitation-api.ts +132 -0
  99. package/src/components/forms/util/provider.tsx +603 -0
  100. package/src/components/forms/util/user-api.ts +303 -0
  101. package/src/components/provider/AdfsLoginButton.jsx +38 -0
  102. package/src/components/provider/AlipayLoginButton.jsx +38 -0
  103. package/src/components/provider/AppleLoginButton.jsx +38 -0
  104. package/src/components/provider/AzureADB2CLoginButton.jsx +38 -0
  105. package/src/components/provider/AzureADLoginButton.jsx +38 -0
  106. package/src/components/provider/BaiduLoginButton.jsx +38 -0
  107. package/src/components/provider/BilibiliLoginButton.jsx +37 -0
  108. package/src/components/provider/CasdoorLoginButton.jsx +38 -0
  109. package/src/components/provider/DingTalkLoginButton.jsx +37 -0
  110. package/src/components/provider/DouyinLoginButton.jsx +38 -0
  111. package/src/components/provider/FacebookLoginButton.jsx +37 -0
  112. package/src/components/provider/GitHubLoginButton.jsx +37 -0
  113. package/src/components/provider/GitLabLoginButton.jsx +38 -0
  114. package/src/components/provider/GiteeLoginButton.jsx +34 -0
  115. package/src/components/provider/GoogleLoginButton.jsx +68 -0
  116. package/src/components/provider/InfoflowLoginButton.jsx +38 -0
  117. package/src/components/provider/LarkLoginButton.jsx +38 -0
  118. package/src/components/provider/LinkedInLoginButton.jsx +37 -0
  119. package/src/components/provider/LoginButton.jsx +33 -0
  120. package/src/components/provider/OktaLoginButton.jsx +38 -0
  121. package/src/components/provider/Provider.jsx +3 -0
  122. package/src/components/provider/ProviderButton.jsx +327 -0
  123. package/src/components/provider/QqLoginButton.jsx +31 -0
  124. package/src/components/provider/SelfLoginButton.jsx +47 -0
  125. package/src/components/provider/SlackLoginButton.jsx +38 -0
  126. package/src/components/provider/SteamLoginButton.jsx +38 -0
  127. package/src/components/provider/WeComLoginButton.jsx +34 -0
  128. package/src/components/provider/Web3Auth.jsx +365 -0
  129. package/src/components/provider/WechatLoginButton.jsx +37 -0
  130. package/src/components/provider/WeiboLoginButton.jsx +34 -0
  131. package/src/components/util.tsx +173 -0
  132. package/src/i18n/en/signup.json +48 -0
  133. package/src/i18n/index.ts +17 -0
  134. package/src/index.tsx +6 -1
  135. package/vite.config.ts +33 -25
@@ -0,0 +1,303 @@
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 i18next from "i18next";
16
+
17
+ import { getAcceptLanguage, deepCopy, showMessage, ROOT_URLS } from "./core";
18
+
19
+ export function getGlobalUsers(
20
+ page,
21
+ pageSize,
22
+ field = "",
23
+ value = "",
24
+ sortField = "",
25
+ sortOrder = ""
26
+ ) {
27
+ return fetch(
28
+ `${ROOT_URLS.casdoor}/api/get-global-users?p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`,
29
+ {
30
+ method: "GET",
31
+ credentials: "include",
32
+ headers: {
33
+ "Accept-Language": getAcceptLanguage(),
34
+ },
35
+ }
36
+ ).then((res) => res.json());
37
+ }
38
+
39
+ export function getUsers(
40
+ owner,
41
+ page = "",
42
+ pageSize = "",
43
+ field = "",
44
+ value = "",
45
+ sortField = "",
46
+ sortOrder = "",
47
+ groupName = ""
48
+ ) {
49
+ return fetch(
50
+ `${ROOT_URLS.casdoor}/api/get-users?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}&groupName=${groupName}`,
51
+ {
52
+ method: "GET",
53
+ credentials: "include",
54
+ headers: {
55
+ "Accept-Language": getAcceptLanguage(),
56
+ },
57
+ }
58
+ ).then((res) => res.json());
59
+ }
60
+
61
+ export function getUser(owner, name) {
62
+ return fetch(
63
+ `${ROOT_URLS.casdoor}/api/get-user?id=${owner}/${encodeURIComponent(name)}`,
64
+ {
65
+ method: "GET",
66
+ credentials: "include",
67
+ headers: {
68
+ "Accept-Language": getAcceptLanguage(),
69
+ },
70
+ }
71
+ ).then((res) => res.json());
72
+ }
73
+
74
+ export function addUserKeys(user) {
75
+ return fetch(`${ROOT_URLS.casdoor}/api/add-user-keys`, {
76
+ method: "POST",
77
+ credentials: "include",
78
+ body: JSON.stringify(user),
79
+ headers: {
80
+ "Accept-Language": getAcceptLanguage(),
81
+ },
82
+ }).then((res) => res.json());
83
+ }
84
+
85
+ export function updateUser(owner, name, user) {
86
+ const newUser = deepCopy(user);
87
+ return fetch(
88
+ `${ROOT_URLS.casdoor}/api/update-user?id=${owner}/${encodeURIComponent(name)}`,
89
+ {
90
+ method: "POST",
91
+ credentials: "include",
92
+ body: JSON.stringify(newUser),
93
+ headers: {
94
+ "Accept-Language": getAcceptLanguage(),
95
+ },
96
+ }
97
+ ).then((res) => res.json());
98
+ }
99
+
100
+ export function addUser(user) {
101
+ const newUser = deepCopy(user);
102
+ return fetch(`${ROOT_URLS.casdoor}/api/add-user`, {
103
+ method: "POST",
104
+ credentials: "include",
105
+ body: JSON.stringify(newUser),
106
+ headers: {
107
+ "Accept-Language": getAcceptLanguage(),
108
+ },
109
+ }).then((res) => res.json());
110
+ }
111
+
112
+ export function deleteUser(user) {
113
+ const newUser = deepCopy(user);
114
+ return fetch(`${ROOT_URLS.casdoor}/api/delete-user`, {
115
+ method: "POST",
116
+ credentials: "include",
117
+ body: JSON.stringify(newUser),
118
+ headers: {
119
+ "Accept-Language": getAcceptLanguage(),
120
+ },
121
+ }).then((res) => res.json());
122
+ }
123
+
124
+ export function getAddressOptions(url) {
125
+ return fetch(url, {
126
+ method: "GET",
127
+ }).then((res) => res.json());
128
+ }
129
+
130
+ export function getAffiliationOptions(url, code) {
131
+ return fetch(`${url}/${code}`, {
132
+ method: "GET",
133
+ }).then((res) => res.json());
134
+ }
135
+
136
+ export function setPassword(
137
+ userOwner,
138
+ userName,
139
+ oldPassword,
140
+ newPassword,
141
+ code = ""
142
+ ) {
143
+ const formData = new FormData();
144
+ formData.append("userOwner", userOwner);
145
+ formData.append("userName", userName);
146
+ formData.append("oldPassword", oldPassword);
147
+ formData.append("newPassword", newPassword);
148
+ if (code) {
149
+ formData.append("code", code);
150
+ }
151
+
152
+ return fetch(`${ROOT_URLS.casdoor}/api/set-password`, {
153
+ method: "POST",
154
+ credentials: "include",
155
+ body: formData,
156
+ headers: {
157
+ "Accept-Language": getAcceptLanguage(),
158
+ },
159
+ }).then((res) => res.json());
160
+ }
161
+
162
+ export function sendCode(
163
+ captchaType,
164
+ captchaToken,
165
+ clientSecret,
166
+ method,
167
+ countryCode = "",
168
+ dest,
169
+ type,
170
+ applicationId,
171
+ checkUser = ""
172
+ ) {
173
+ const formData = new FormData();
174
+ formData.append("captchaType", captchaType);
175
+ formData.append("captchaToken", captchaToken);
176
+ formData.append("clientSecret", clientSecret);
177
+ formData.append("method", method);
178
+ formData.append("countryCode", countryCode);
179
+ formData.append("dest", dest);
180
+ formData.append("type", type);
181
+ formData.append("applicationId", "admin/" + applicationId);
182
+ formData.append("checkUser", checkUser);
183
+ console.log(Object.fromEntries(formData.entries()));
184
+ return fetch(`${ROOT_URLS.casdoor}/api/send-verification-code`, {
185
+ method: "POST",
186
+ credentials: "include",
187
+ body: formData,
188
+ headers: {
189
+ "Accept-Language": getAcceptLanguage(),
190
+ },
191
+ })
192
+ .then((res) => res.json())
193
+ .then((res) => {
194
+ if (res.status === "ok") {
195
+ showMessage("success", "Verification code sent"); //i18next.t("user:Verification code sent"));
196
+ return true;
197
+ } else {
198
+ showMessage("error", res.msg);
199
+ return false;
200
+ }
201
+ });
202
+ }
203
+
204
+ export function verifyCaptcha(
205
+ owner,
206
+ name,
207
+ captchaType,
208
+ captchaToken,
209
+ clientSecret
210
+ ) {
211
+ const formData = new FormData();
212
+ formData.append("captchaType", captchaType);
213
+ formData.append("captchaToken", captchaToken);
214
+ formData.append("clientSecret", clientSecret);
215
+ formData.append("applicationId", `${owner}/${name}`);
216
+ return fetch(`${ROOT_URLS.casdoor}/api/verify-captcha`, {
217
+ method: "POST",
218
+ credentials: "include",
219
+ body: formData,
220
+ headers: {
221
+ "Accept-Language": getAcceptLanguage(),
222
+ },
223
+ })
224
+ .then((res) => res.json())
225
+ .then((res) => {
226
+ if (res.status === "ok") {
227
+ if (res.data) {
228
+ showMessage("success", "Captcha Verify Success"); // i18next.t("user:Captcha Verify Success"));
229
+ } else {
230
+ showMessage("error", "Captcha Verify Failed"); // i18next.t("user:Captcha Verify Failed"));
231
+ }
232
+ return true;
233
+ } else {
234
+ showMessage("error", res.msg); //i18next.t("user:" + res.msg));
235
+ return false;
236
+ }
237
+ });
238
+ }
239
+
240
+ export function resetEmailOrPhone(dest, type, code) {
241
+ const formData = new FormData();
242
+ formData.append("dest", dest);
243
+ formData.append("type", type);
244
+ formData.append("code", code);
245
+ return fetch(`${ROOT_URLS.casdoor}/api/reset-email-or-phone`, {
246
+ method: "POST",
247
+ credentials: "include",
248
+ body: formData,
249
+ headers: {
250
+ "Accept-Language": getAcceptLanguage(),
251
+ },
252
+ }).then((res) => res.json());
253
+ }
254
+
255
+ export function getCaptcha(owner, name, isCurrentProvider) {
256
+ return fetch(
257
+ `${ROOT_URLS.casdoor}/api/get-captcha?applicationId=${owner}/${encodeURIComponent(
258
+ name
259
+ )}&isCurrentProvider=${isCurrentProvider}`,
260
+ {
261
+ method: "GET",
262
+ headers: {
263
+ "Accept-Language": getAcceptLanguage(),
264
+ },
265
+ }
266
+ )
267
+ .then((res) => res.json())
268
+ .then((res) => res.data);
269
+ }
270
+
271
+ export function verifyCode(values) {
272
+ return fetch(`${ROOT_URLS.casdoor}/api/verify-code`, {
273
+ method: "POST",
274
+ credentials: "include",
275
+ body: JSON.stringify(values),
276
+ headers: {
277
+ "Accept-Language": getAcceptLanguage(),
278
+ },
279
+ }).then((res) => res.json());
280
+ }
281
+
282
+ export function checkUserPassword(values) {
283
+ return fetch(`${ROOT_URLS.casdoor}/api/check-user-password`, {
284
+ method: "POST",
285
+ credentials: "include",
286
+ body: JSON.stringify(values),
287
+ }).then((res) => res.json());
288
+ }
289
+
290
+ export function removeUserFromGroup({ owner, name, groupName }) {
291
+ const formData = new FormData();
292
+ formData.append("owner", owner);
293
+ formData.append("name", name);
294
+ formData.append("groupName", groupName);
295
+ return fetch(`${ROOT_URLS.casdoor}/api/remove-user-from-group`, {
296
+ method: "POST",
297
+ credentials: "include",
298
+ body: formData,
299
+ headers: {
300
+ "Accept-Language": getAcceptLanguage(),
301
+ },
302
+ }).then((res) => res.json());
303
+ }
@@ -0,0 +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/adfs.svg`}
22
+ alt="Sign in with ADFS"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with ADFS",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const AdfsLoginButton = createButton(config);
37
+
38
+ export default AdfsLoginButton;
@@ -0,0 +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/alipay.svg`}
22
+ alt="Sign in with Alipay"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Alipay",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const AlipayLoginButton = createButton(config);
37
+
38
+ export default AlipayLoginButton;
@@ -0,0 +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/apple.svg`}
22
+ alt="Sign in with Apple"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Apple",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const AppleLoginButton = createButton(config);
37
+
38
+ export default AppleLoginButton;
@@ -0,0 +1,38 @@
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 { 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/azuread.svg`}
22
+ alt="Sign in with Azure AD B2C"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Azure AD B2C",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const AzureADB2CLoginButton = createButton(config);
37
+
38
+ export default AzureADB2CLoginButton;
@@ -0,0 +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/azuread.svg`}
22
+ alt="Sign in with Azure AD"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Azure AD",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const AzureADLoginButton = createButton(config);
37
+
38
+ export default AzureADLoginButton;
@@ -0,0 +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/baidu.svg`}
22
+ alt="Sign in with Baidu"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Baidu",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const BaiduLoginButton = createButton(config);
37
+
38
+ export default BaiduLoginButton;
@@ -0,0 +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/bilibili.svg`}
22
+ alt="Sign in with Bilibili"
23
+ />
24
+ );
25
+ }
26
+
27
+ const config = {
28
+ text: "Sign in with Bilibili",
29
+ icon: Icon,
30
+ iconFormat: (name) => `fa fa-${name}`,
31
+ style: { background: "#0191e0" },
32
+ activeStyle: { background: "rgb(76,143,208)" },
33
+ };
34
+
35
+ const BilibiliLoginButton = createButton(config);
36
+
37
+ export default BilibiliLoginButton;
@@ -0,0 +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/casdoor.svg`}
22
+ alt="Sign in with Casdoor"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Casdoor",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const CasdoorLoginButton = createButton(config);
37
+
38
+ export default CasdoorLoginButton;
@@ -0,0 +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/dingtalk.svg`}
22
+ alt="Sign in with DingTalk"
23
+ />
24
+ );
25
+ }
26
+
27
+ const config = {
28
+ text: "Sign in with DingTalk",
29
+ icon: Icon,
30
+ iconFormat: (name) => `fa fa-${name}`,
31
+ style: { background: "#0191e0" },
32
+ activeStyle: { background: "rgb(76,143,208)" },
33
+ };
34
+
35
+ const DingTalkLoginButton = createButton(config);
36
+
37
+ export default DingTalkLoginButton;
@@ -0,0 +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/douyin.svg`}
22
+ alt="Sign in with Douyin"
23
+ style={{ width: 24, height: 24 }}
24
+ />
25
+ );
26
+ }
27
+
28
+ const config = {
29
+ text: "Sign in with Douyin",
30
+ icon: Icon,
31
+ iconFormat: (name) => `fa fa-${name}`,
32
+ style: { background: "#ffffff", color: "#000000" },
33
+ activeStyle: { background: "#ededee" },
34
+ };
35
+
36
+ const DouyinLoginButton = createButton(config);
37
+
38
+ export default DouyinLoginButton;