@springmicro/auth 0.7.0 → 0.7.2
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/.eslintrc.cjs +18 -18
- package/README.md +60 -60
- package/dist/Index-64ac63ff-ChMmeIY7.js +0 -0
- package/dist/Index-6c094240-hn_S7Xeg.js +0 -0
- package/dist/Web3Auth-CGD96zai.js +0 -0
- package/dist/alphawallet-B7eovdf-.js +0 -0
- package/dist/apexwallet-ysP20G9D.js +0 -0
- package/dist/atoken-BBnNTzcz.js +0 -0
- package/dist/bifrostwallet-CNNBO92h.js +0 -0
- package/dist/binance-DvPgAzCw.js +0 -0
- package/dist/bitget-DZOUrwgy.js +0 -0
- package/dist/bitpie-C_uxmEzw.js +0 -0
- package/dist/bitski-DpzkHNkv.js +0 -0
- package/dist/blockwallet-BL69cqkA.js +0 -0
- package/dist/brave-DnRzMQYW.js +0 -0
- package/dist/ccip-c78d2f16-DLcRlwod.js +0 -0
- package/dist/coin98wallet-CkFdOvXt.js +0 -0
- package/dist/coinbase-CaGNx5if.js +0 -0
- package/dist/core-9rK8tWud.js +0 -0
- package/dist/defiwallet-0AsgJBSy.js +0 -0
- package/dist/detected-CX_JZaUk.js +0 -0
- package/dist/echooo-CmaetT_Z.js +0 -0
- package/dist/enkrypt-BibtwvK7.js +0 -0
- package/dist/exodus-BxzkDWWP.js +0 -0
- package/dist/fordefi-CvKyVwhI.js +0 -0
- package/dist/foxwallet-D7c_LDTf.js +0 -0
- package/dist/frame-CDfNmjUy.js +0 -0
- package/dist/frontier-DqKNSj2z.js +0 -0
- package/dist/hashMessage-Bdgmx0rg.js +0 -0
- package/dist/huobiwallet-CxSwqa5L.js +0 -0
- package/dist/hyperpay-nmHE3WqM.js +0 -0
- package/dist/icon-2Zqy7pqQ.js +0 -0
- package/dist/icon-CGWI1Ies.js +0 -0
- package/dist/icon-C_O4nprO.js +0 -0
- package/dist/icon-DbgmZCnU.js +0 -0
- package/dist/icon-Dbjb6jc5.js +0 -0
- package/dist/icon-cAd7RhSC.js +0 -0
- package/dist/imtoken-yENtOTS3.js +0 -0
- package/dist/index-021f6a62-Zz543EDB.js +0 -0
- package/dist/index-40a497ea-Bn2mC0r7.js +0 -0
- package/dist/index-62liFLUM.js +0 -0
- package/dist/index-BBx_mvyX.js +0 -0
- package/dist/index-C6leUA25.js +0 -0
- package/dist/index-CAVvArYp.js +0 -0
- package/dist/index-Ct7cFdFm.js +0 -0
- package/dist/index-DA32_Pfh.js +0 -0
- package/dist/index-Dna0rycp.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/index.umd.cjs +0 -0
- package/dist/infinitywallet-C8J4FUYw.js +0 -0
- package/dist/kayros-AIrUK1za.js +0 -0
- package/dist/keplr-CyLTca9B.js +0 -0
- package/dist/lif3wallet-C5D6r8pg.js +0 -0
- package/dist/liquality-nbCtErVq.js +0 -0
- package/dist/mathwallet-CWkivCXo.js +0 -0
- package/dist/meetone-kKmvI8md.js +0 -0
- package/dist/metamask-BN7yiDV1.js +0 -0
- package/dist/mykey-CQZ6UcLH.js +0 -0
- package/dist/native-FDN9oNjc.js +0 -0
- package/dist/number-C-98SESp.js +0 -0
- package/dist/okxwallet-CJLVogh2.js +0 -0
- package/dist/oneInch-CciyZ4Pz.js +0 -0
- package/dist/onekey-Dal8kYjU.js +0 -0
- package/dist/opera-DnKg-TJU.js +0 -0
- package/dist/ownbit-BshJUVuW.js +0 -0
- package/dist/phantom-CJ8dIcov.js +0 -0
- package/dist/rabby-D4thTcd6.js +0 -0
- package/dist/rainbow-mXld6yWV.js +0 -0
- package/dist/roninwallet-ZyYrd-D1.js +0 -0
- package/dist/safeheron-Eg1Jb29V.js +0 -0
- package/dist/safepal-DVIKy94N.js +0 -0
- package/dist/sequence-BS2IbtDg.js +0 -0
- package/dist/stablewallet-jyB079Wb.js +0 -0
- package/dist/status-FrAvQjfn.js +0 -0
- package/dist/subwallet-DMvFqKyY.js +0 -0
- package/dist/talisman-Bp8zUXqB.js +0 -0
- package/dist/tallywallet-B4OS9nIr.js +0 -0
- package/dist/tokenary-C7jjcbQa.js +0 -0
- package/dist/tokenpocket-9ZRPmAFA.js +0 -0
- package/dist/tp-V2em5bdl.js +0 -0
- package/dist/transactionRequest-be6a8ea9-CUKWo5mx.js +0 -0
- package/dist/trust-SgHubMq7.js +0 -0
- package/dist/xdefi-COVIyGz4.js +0 -0
- package/dist/zeal-DxHbDqm0.js +0 -0
- package/dist/zerion-BfW0UElc.js +0 -0
- package/dist/zodiacpilot-CrId6F4w.js +0 -0
- package/index.html +13 -13
- package/package.json +2 -2
- package/springmicro-auth-0.6.1.tgz +0 -0
- package/src/auth/config.ts +0 -0
- package/src/components/SignUp.tsx +0 -0
- package/src/components/forms/AgreementModal.tsx +88 -88
- package/src/components/forms/CaptchaController.tsx +94 -94
- package/src/components/forms/CaptchaModal.jsx +171 -171
- package/src/components/forms/CaptchaWidget.jsx +146 -146
- package/src/components/forms/PasswordChecker.ts +88 -88
- package/src/components/forms/SendCodeInput.tsx +0 -0
- package/src/components/forms/SignUpFormItem.tsx +0 -0
- package/src/components/forms/util/application-api.ts +0 -0
- package/src/components/forms/util/auth-api.ts +198 -198
- package/src/components/forms/util/auth-util.tsx +346 -346
- package/src/components/forms/util/core.ts +493 -493
- package/src/components/forms/util/invitation-api.ts +132 -132
- package/src/components/forms/util/provider.tsx +603 -603
- package/src/components/forms/util/user-api.ts +0 -0
- package/src/components/provider/AdfsLoginButton.jsx +38 -38
- package/src/components/provider/AlipayLoginButton.jsx +38 -38
- package/src/components/provider/AppleLoginButton.jsx +38 -38
- package/src/components/provider/AzureADB2CLoginButton.jsx +38 -38
- package/src/components/provider/AzureADLoginButton.jsx +38 -38
- package/src/components/provider/BaiduLoginButton.jsx +38 -38
- package/src/components/provider/BilibiliLoginButton.jsx +37 -37
- package/src/components/provider/CasdoorLoginButton.jsx +38 -38
- package/src/components/provider/DingTalkLoginButton.jsx +37 -37
- package/src/components/provider/DouyinLoginButton.jsx +38 -38
- package/src/components/provider/FacebookLoginButton.jsx +37 -37
- package/src/components/provider/GitHubLoginButton.jsx +37 -37
- package/src/components/provider/GitLabLoginButton.jsx +38 -38
- package/src/components/provider/GiteeLoginButton.jsx +34 -34
- package/src/components/provider/GoogleLoginButton.jsx +68 -68
- package/src/components/provider/InfoflowLoginButton.jsx +38 -38
- package/src/components/provider/LarkLoginButton.jsx +38 -38
- package/src/components/provider/LinkedInLoginButton.jsx +37 -37
- package/src/components/provider/LoginButton.jsx +33 -33
- package/src/components/provider/OktaLoginButton.jsx +38 -38
- package/src/components/provider/Provider.jsx +3 -3
- package/src/components/provider/ProviderButton.jsx +327 -327
- package/src/components/provider/QqLoginButton.jsx +31 -31
- package/src/components/provider/SelfLoginButton.jsx +47 -47
- package/src/components/provider/SlackLoginButton.jsx +38 -38
- package/src/components/provider/SteamLoginButton.jsx +38 -38
- package/src/components/provider/WeComLoginButton.jsx +34 -34
- package/src/components/provider/Web3Auth.jsx +365 -365
- package/src/components/provider/WechatLoginButton.jsx +37 -37
- package/src/components/provider/WeiboLoginButton.jsx +34 -34
- package/src/components/util.tsx +0 -0
- package/src/i18n/en/signup.json +48 -48
- package/src/i18n/index.ts +17 -17
- package/src/index.tsx +0 -0
- package/src/vite-env.d.ts +1 -1
- package/tsconfig.json +23 -23
- package/tsconfig.node.json +10 -10
- package/vite.config.ts +33 -33
|
@@ -1,31 +1,31 @@
|
|
|
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
|
-
|
|
17
|
-
function Icon({width = 24, height = 24, color}) {
|
|
18
|
-
return <svg xmlns="http://www.w3.org/2000/svg" height="48" width="32" viewBox="-18.15 -35.9725 157.3 215.835"><path fill="#faab07" d="M60.503 142.237c-12.533 0-24.038-4.195-31.445-10.46-3.762 1.124-8.574 2.932-11.61 5.175-2.6 1.918-2.275 3.874-1.807 4.663 2.056 3.47 35.273 2.216 44.862 1.136zm0 0c12.535 0 24.039-4.195 31.447-10.46 3.76 1.124 8.573 2.932 11.61 5.175 2.598 1.918 2.274 3.874 1.805 4.663-2.056 3.47-35.272 2.216-44.862 1.136zm0 0" /><path d="M60.576 67.119c20.698-.14 37.286-4.147 42.907-5.683 1.34-.367 2.056-1.024 2.056-1.024.005-.189.085-3.37.085-5.01C105.624 27.768 92.58.001 60.5 0 28.42.001 15.375 27.769 15.375 55.401c0 1.642.08 4.822.086 5.01 0 0 .583.615 1.65.913 5.19 1.444 22.09 5.65 43.312 5.795zm56.245 23.02c-1.283-4.129-3.034-8.944-4.808-13.568 0 0-1.02-.126-1.537.023-15.913 4.623-35.202 7.57-49.9 7.392h-.153c-14.616.175-33.774-2.737-49.634-7.315-.606-.175-1.802-.1-1.802-.1-1.774 4.624-3.525 9.44-4.808 13.568-6.119 19.69-4.136 27.838-2.627 28.02 3.239.392 12.606-14.821 12.606-14.821 0 15.459 13.957 39.195 45.918 39.413h.848c31.96-.218 45.917-23.954 45.917-39.413 0 0 9.368 15.213 12.607 14.822 1.508-.183 3.491-8.332-2.627-28.021" /><path fill="#fff" d="M49.085 40.824c-4.352.197-8.07-4.76-8.304-11.063-.236-6.305 3.098-11.576 7.45-11.773 4.347-.195 8.064 4.76 8.3 11.065.238 6.306-3.097 11.577-7.446 11.771m31.133-11.063c-.233 6.302-3.951 11.26-8.303 11.063-4.35-.195-7.684-5.465-7.446-11.77.236-6.305 3.952-11.26 8.3-11.066 4.352.197 7.686 5.468 7.449 11.773" /><path fill="#faab07" d="M87.952 49.725C86.79 47.15 75.077 44.28 60.578 44.28h-.156c-14.5 0-26.212 2.87-27.375 5.446a.863.863 0 00-.085.367.88.88 0 00.16.496c.98 1.427 13.985 8.487 27.3 8.487h.156c13.314 0 26.319-7.058 27.299-8.487a.873.873 0 00.16-.498.856.856 0 00-.085-.365" /><path d="M54.434 29.854c.199 2.49-1.167 4.702-3.046 4.943-1.883.242-3.568-1.58-3.768-4.07-.197-2.492 1.167-4.704 3.043-4.944 1.886-.244 3.574 1.58 3.771 4.07m11.956.833c.385-.689 3.004-4.312 8.427-2.993 1.425.347 2.084.857 2.223 1.057.205.296.262.718.053 1.286-.412 1.126-1.263 1.095-1.734.875-.305-.142-4.082-2.66-7.562 1.097-.24.257-.668.346-1.073.04-.407-.308-.574-.93-.334-1.362" /><path fill="#fff" d="M60.576 83.08h-.153c-9.996.12-22.116-1.204-33.854-3.518-1.004 5.818-1.61 13.132-1.09 21.853 1.316 22.043 14.407 35.9 34.614 36.1h.82c20.208-.2 33.298-14.057 34.616-36.1.52-8.723-.087-16.035-1.092-21.854-11.739 2.315-23.862 3.64-33.86 3.518" /><path fill="#eb1923" d="M32.102 81.235v21.693s9.937 2.004 19.893.616V83.535c-6.307-.357-13.109-1.152-19.893-2.3" /><path fill="#eb1923" d="M105.539 60.412s-19.33 6.102-44.963 6.275h-.153c-25.591-.172-44.896-6.255-44.962-6.275L8.987 76.57c16.193 4.882 36.261 8.028 51.436 7.845h.153c15.175.183 35.242-2.963 51.437-7.845zm0 0" /></svg>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const config = {
|
|
22
|
-
text: "Sign in with QQ",
|
|
23
|
-
icon: Icon,
|
|
24
|
-
iconFormat: name => `fa fa-${name}`,
|
|
25
|
-
style: {background: "rgb(94,188,249)"},
|
|
26
|
-
activeStyle: {background: "rgb(76,143,208)"},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const QqLoginButton = createButton(config);
|
|
30
|
-
|
|
31
|
-
export default QqLoginButton;
|
|
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
|
+
|
|
17
|
+
function Icon({width = 24, height = 24, color}) {
|
|
18
|
+
return <svg xmlns="http://www.w3.org/2000/svg" height="48" width="32" viewBox="-18.15 -35.9725 157.3 215.835"><path fill="#faab07" d="M60.503 142.237c-12.533 0-24.038-4.195-31.445-10.46-3.762 1.124-8.574 2.932-11.61 5.175-2.6 1.918-2.275 3.874-1.807 4.663 2.056 3.47 35.273 2.216 44.862 1.136zm0 0c12.535 0 24.039-4.195 31.447-10.46 3.76 1.124 8.573 2.932 11.61 5.175 2.598 1.918 2.274 3.874 1.805 4.663-2.056 3.47-35.272 2.216-44.862 1.136zm0 0" /><path d="M60.576 67.119c20.698-.14 37.286-4.147 42.907-5.683 1.34-.367 2.056-1.024 2.056-1.024.005-.189.085-3.37.085-5.01C105.624 27.768 92.58.001 60.5 0 28.42.001 15.375 27.769 15.375 55.401c0 1.642.08 4.822.086 5.01 0 0 .583.615 1.65.913 5.19 1.444 22.09 5.65 43.312 5.795zm56.245 23.02c-1.283-4.129-3.034-8.944-4.808-13.568 0 0-1.02-.126-1.537.023-15.913 4.623-35.202 7.57-49.9 7.392h-.153c-14.616.175-33.774-2.737-49.634-7.315-.606-.175-1.802-.1-1.802-.1-1.774 4.624-3.525 9.44-4.808 13.568-6.119 19.69-4.136 27.838-2.627 28.02 3.239.392 12.606-14.821 12.606-14.821 0 15.459 13.957 39.195 45.918 39.413h.848c31.96-.218 45.917-23.954 45.917-39.413 0 0 9.368 15.213 12.607 14.822 1.508-.183 3.491-8.332-2.627-28.021" /><path fill="#fff" d="M49.085 40.824c-4.352.197-8.07-4.76-8.304-11.063-.236-6.305 3.098-11.576 7.45-11.773 4.347-.195 8.064 4.76 8.3 11.065.238 6.306-3.097 11.577-7.446 11.771m31.133-11.063c-.233 6.302-3.951 11.26-8.303 11.063-4.35-.195-7.684-5.465-7.446-11.77.236-6.305 3.952-11.26 8.3-11.066 4.352.197 7.686 5.468 7.449 11.773" /><path fill="#faab07" d="M87.952 49.725C86.79 47.15 75.077 44.28 60.578 44.28h-.156c-14.5 0-26.212 2.87-27.375 5.446a.863.863 0 00-.085.367.88.88 0 00.16.496c.98 1.427 13.985 8.487 27.3 8.487h.156c13.314 0 26.319-7.058 27.299-8.487a.873.873 0 00.16-.498.856.856 0 00-.085-.365" /><path d="M54.434 29.854c.199 2.49-1.167 4.702-3.046 4.943-1.883.242-3.568-1.58-3.768-4.07-.197-2.492 1.167-4.704 3.043-4.944 1.886-.244 3.574 1.58 3.771 4.07m11.956.833c.385-.689 3.004-4.312 8.427-2.993 1.425.347 2.084.857 2.223 1.057.205.296.262.718.053 1.286-.412 1.126-1.263 1.095-1.734.875-.305-.142-4.082-2.66-7.562 1.097-.24.257-.668.346-1.073.04-.407-.308-.574-.93-.334-1.362" /><path fill="#fff" d="M60.576 83.08h-.153c-9.996.12-22.116-1.204-33.854-3.518-1.004 5.818-1.61 13.132-1.09 21.853 1.316 22.043 14.407 35.9 34.614 36.1h.82c20.208-.2 33.298-14.057 34.616-36.1.52-8.723-.087-16.035-1.092-21.854-11.739 2.315-23.862 3.64-33.86 3.518" /><path fill="#eb1923" d="M32.102 81.235v21.693s9.937 2.004 19.893.616V83.535c-6.307-.357-13.109-1.152-19.893-2.3" /><path fill="#eb1923" d="M105.539 60.412s-19.33 6.102-44.963 6.275h-.153c-25.591-.172-44.896-6.255-44.962-6.275L8.987 76.57c16.193 4.882 36.261 8.028 51.436 7.845h.153c15.175.183 35.242-2.963 51.437-7.845zm0 0" /></svg>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const config = {
|
|
22
|
+
text: "Sign in with QQ",
|
|
23
|
+
icon: Icon,
|
|
24
|
+
iconFormat: name => `fa fa-${name}`,
|
|
25
|
+
style: {background: "rgb(94,188,249)"},
|
|
26
|
+
activeStyle: {background: "rgb(76,143,208)"},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const QqLoginButton = createButton(config);
|
|
30
|
+
|
|
31
|
+
export default QqLoginButton;
|
|
@@ -1,47 +1,47 @@
|
|
|
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 React from "react";
|
|
16
|
-
import {createButton} from "react-social-login-buttons";
|
|
17
|
-
|
|
18
|
-
class SelfLoginButton extends React.Component {
|
|
19
|
-
generateIcon() {
|
|
20
|
-
const avatar = this.props.account.avatar;
|
|
21
|
-
return () => {
|
|
22
|
-
return <img width={36} height={36} src={avatar} alt="Sign in with Google" />;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
getAccountShowName() {
|
|
27
|
-
let {name, displayName} = this.props.account;
|
|
28
|
-
if (displayName !== "") {
|
|
29
|
-
name += " (" + displayName + ")";
|
|
30
|
-
}
|
|
31
|
-
return name;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
render() {
|
|
35
|
-
const config = {
|
|
36
|
-
icon: this.generateIcon(),
|
|
37
|
-
iconFormat: name => `fa fa-${name}`,
|
|
38
|
-
style: {background: "#ffffff", color: "#000000"},
|
|
39
|
-
activeStyle: {background: "#eff0ee"},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const SelfLoginButton = createButton(config);
|
|
43
|
-
return <SelfLoginButton text={this.getAccountShowName()} onClick={this.props.onClick} align={"center"} />;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default SelfLoginButton;
|
|
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 React from "react";
|
|
16
|
+
import {createButton} from "react-social-login-buttons";
|
|
17
|
+
|
|
18
|
+
class SelfLoginButton extends React.Component {
|
|
19
|
+
generateIcon() {
|
|
20
|
+
const avatar = this.props.account.avatar;
|
|
21
|
+
return () => {
|
|
22
|
+
return <img width={36} height={36} src={avatar} alt="Sign in with Google" />;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
getAccountShowName() {
|
|
27
|
+
let {name, displayName} = this.props.account;
|
|
28
|
+
if (displayName !== "") {
|
|
29
|
+
name += " (" + displayName + ")";
|
|
30
|
+
}
|
|
31
|
+
return name;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
render() {
|
|
35
|
+
const config = {
|
|
36
|
+
icon: this.generateIcon(),
|
|
37
|
+
iconFormat: name => `fa fa-${name}`,
|
|
38
|
+
style: {background: "#ffffff", color: "#000000"},
|
|
39
|
+
activeStyle: {background: "#eff0ee"},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const SelfLoginButton = createButton(config);
|
|
43
|
+
return <SelfLoginButton text={this.getAccountShowName()} onClick={this.props.onClick} align={"center"} />;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default SelfLoginButton;
|
|
@@ -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/slack.svg`}
|
|
22
|
-
alt="Sign in with Slack"
|
|
23
|
-
style={{ width: 24, height: 24 }}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const config = {
|
|
29
|
-
text: "Sign in with Slack",
|
|
30
|
-
icon: Icon,
|
|
31
|
-
iconFormat: (name) => `fa fa-${name}`,
|
|
32
|
-
style: { background: "#ffffff", color: "#000000" },
|
|
33
|
-
activeStyle: { background: "#ededee" },
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const SlackLoginButton = createButton(config);
|
|
37
|
-
|
|
38
|
-
export default SlackLoginButton;
|
|
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/slack.svg`}
|
|
22
|
+
alt="Sign in with Slack"
|
|
23
|
+
style={{ width: 24, height: 24 }}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const config = {
|
|
29
|
+
text: "Sign in with Slack",
|
|
30
|
+
icon: Icon,
|
|
31
|
+
iconFormat: (name) => `fa fa-${name}`,
|
|
32
|
+
style: { background: "#ffffff", color: "#000000" },
|
|
33
|
+
activeStyle: { background: "#ededee" },
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const SlackLoginButton = createButton(config);
|
|
37
|
+
|
|
38
|
+
export default SlackLoginButton;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
// Copyright 2022 The casbin 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/steam.svg`}
|
|
22
|
-
alt="Sign in with Steam"
|
|
23
|
-
style={{ width: 24, height: 24 }}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const config = {
|
|
29
|
-
text: "Sign in with Steam",
|
|
30
|
-
icon: Icon,
|
|
31
|
-
iconFormat: (name) => `fa fa-${name}`,
|
|
32
|
-
style: { background: "#ffffff", color: "#000000" },
|
|
33
|
-
activeStyle: { background: "#ededee" },
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const SteamLoginButton = createButton(config);
|
|
37
|
-
|
|
38
|
-
export default SteamLoginButton;
|
|
1
|
+
// Copyright 2022 The casbin 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/steam.svg`}
|
|
22
|
+
alt="Sign in with Steam"
|
|
23
|
+
style={{ width: 24, height: 24 }}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const config = {
|
|
29
|
+
text: "Sign in with Steam",
|
|
30
|
+
icon: Icon,
|
|
31
|
+
iconFormat: (name) => `fa fa-${name}`,
|
|
32
|
+
style: { background: "#ffffff", color: "#000000" },
|
|
33
|
+
activeStyle: { background: "#ededee" },
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const SteamLoginButton = createButton(config);
|
|
37
|
+
|
|
38
|
+
export default SteamLoginButton;
|
|
@@ -1,34 +1,34 @@
|
|
|
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 src={`${StaticBaseUrl}/buttons/wecom.svg`} alt="Sign in with WeCom" />
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const config = {
|
|
25
|
-
text: "Sign in with WeCom",
|
|
26
|
-
icon: Icon,
|
|
27
|
-
iconFormat: (name) => `fa fa-${name}`,
|
|
28
|
-
style: { background: "rgb(255,255,255)", color: "#000000" },
|
|
29
|
-
activeStyle: { background: "rgb(100,150,250)" },
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const WeComLoginButton = createButton(config);
|
|
33
|
-
|
|
34
|
-
export default WeComLoginButton;
|
|
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 src={`${StaticBaseUrl}/buttons/wecom.svg`} alt="Sign in with WeCom" />
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const config = {
|
|
25
|
+
text: "Sign in with WeCom",
|
|
26
|
+
icon: Icon,
|
|
27
|
+
iconFormat: (name) => `fa fa-${name}`,
|
|
28
|
+
style: { background: "rgb(255,255,255)", color: "#000000" },
|
|
29
|
+
activeStyle: { background: "rgb(100,150,250)" },
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const WeComLoginButton = createButton(config);
|
|
33
|
+
|
|
34
|
+
export default WeComLoginButton;
|