@authing/react-ui-components 3.1.1 → 3.1.3
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/lib/index.d.ts +2573 -201
- package/lib/index.min.css +2 -1
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +42 -0
- package/lib/static/media/loading.4a67a5f3.svg +29 -0
- package/package.json +54 -18
- package/.eslintignore +0 -6
- package/.eslintrc.js +0 -7
- package/.prettierrc +0 -5
- package/.vscode/settings.json +0 -31
- package/LICENSE +0 -21
- package/config/antdReplacer.js +0 -51
- package/config/env.js +0 -106
- package/config/getHttpsConfig.js +0 -66
- package/config/jest/cssTransform.js +0 -14
- package/config/jest/fileTransform.js +0 -40
- package/config/modules.js +0 -134
- package/config/paths.js +0 -71
- package/config/pnpTs.js +0 -35
- package/config/webpack.config.js +0 -857
- package/config/webpackDevServer.config.js +0 -130
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/scripts/build.js +0 -212
- package/scripts/lib.js +0 -200
- package/scripts/start.js +0 -166
- package/scripts/test.js +0 -53
- package/src/common/AuthingDropdown/index.tsx +0 -52
- package/src/common/AuthingDropdown/style.less +0 -43
- package/src/common/AuthingTabs/index.tsx +0 -98
- package/src/common/AuthingTabs/style.less +0 -135
- package/src/common/CopyAbleText/index.tsx +0 -54
- package/src/common/CopyAbleText/style.less +0 -13
- package/src/common/VerifyCodeInput/index.tsx +0 -76
- package/src/common/VerifyCodeInput/style.less +0 -24
- package/src/components/AuthingGuard/AppMFALayout/index.tsx +0 -74
- package/src/components/AuthingGuard/AppMFALayout/style.less +0 -12
- package/src/components/AuthingGuard/CompleteUserInfoLayout/index.tsx +0 -29
- package/src/components/AuthingGuard/CompleteUserInfoLayout/style.less +0 -8
- package/src/components/AuthingGuard/Forms/ADLoginForm/index.tsx +0 -117
- package/src/components/AuthingGuard/Forms/Agreements/index.tsx +0 -81
- package/src/components/AuthingGuard/Forms/Agreements/style.less +0 -44
- package/src/components/AuthingGuard/Forms/CompleteUserInfoForm/index.tsx +0 -139
- package/src/components/AuthingGuard/Forms/EmailMfaVerifyForm/CheckEmailForm.tsx +0 -86
- package/src/components/AuthingGuard/Forms/EmailMfaVerifyForm/VerifyCodeForm.tsx +0 -116
- package/src/components/AuthingGuard/Forms/EmailMfaVerifyForm/index.tsx +0 -40
- package/src/components/AuthingGuard/Forms/EmailMfaVerifyForm/style.less +0 -0
- package/src/components/AuthingGuard/Forms/EmailRegisterForm/index.tsx +0 -181
- package/src/components/AuthingGuard/Forms/EmailRegisterForm/style.less +0 -0
- package/src/components/AuthingGuard/Forms/LdapLoginForm/index.tsx +0 -161
- package/src/components/AuthingGuard/Forms/LdapLoginForm/style.less +0 -0
- package/src/components/AuthingGuard/Forms/LoginFormFooter/index.tsx +0 -76
- package/src/components/AuthingGuard/Forms/LoginFormFooter/style.less +0 -6
- package/src/components/AuthingGuard/Forms/MfaResetCodeForm/Step1.tsx +0 -86
- package/src/components/AuthingGuard/Forms/MfaResetCodeForm/Step2.tsx +0 -53
- package/src/components/AuthingGuard/Forms/MfaResetCodeForm/index.tsx +0 -65
- package/src/components/AuthingGuard/Forms/MfaResetCodeForm/style.less +0 -20
- package/src/components/AuthingGuard/Forms/MfaVerifyForm/index.tsx +0 -105
- package/src/components/AuthingGuard/Forms/MfaVerifyForm/style.less +0 -12
- package/src/components/AuthingGuard/Forms/PasswordLoginForm/index.tsx +0 -261
- package/src/components/AuthingGuard/Forms/PhoneCodeLoginForm/index.tsx +0 -133
- package/src/components/AuthingGuard/Forms/PhoneRegisterForm/index.tsx +0 -202
- package/src/components/AuthingGuard/Forms/QrCodeLoginForm/index.tsx +0 -61
- package/src/components/AuthingGuard/Forms/QrCodeLoginForm/style.less +0 -14
- package/src/components/AuthingGuard/Forms/RegisterFormFooter/index.tsx +0 -56
- package/src/components/AuthingGuard/Forms/RegisterFormFooter/style.less +0 -0
- package/src/components/AuthingGuard/Forms/ResetPwdForm/Footer.tsx +0 -21
- package/src/components/AuthingGuard/Forms/ResetPwdForm/Step1.tsx +0 -86
- package/src/components/AuthingGuard/Forms/ResetPwdForm/Step2.tsx +0 -127
- package/src/components/AuthingGuard/Forms/ResetPwdForm/Step3.tsx +0 -141
- package/src/components/AuthingGuard/Forms/ResetPwdForm/Step4.tsx +0 -51
- package/src/components/AuthingGuard/Forms/ResetPwdForm/index.tsx +0 -96
- package/src/components/AuthingGuard/Forms/ResetPwdForm/style.less +0 -3
- package/src/components/AuthingGuard/Forms/SendPhoneCode/SendCodeBtn.tsx +0 -88
- package/src/components/AuthingGuard/Forms/SendPhoneCode/index.tsx +0 -50
- package/src/components/AuthingGuard/Forms/SendPhoneCode/style.less +0 -26
- package/src/components/AuthingGuard/Forms/SmsMfaVerifyForm/CheckPhoneForm.tsx +0 -86
- package/src/components/AuthingGuard/Forms/SmsMfaVerifyForm/VerifyCodeForm.tsx +0 -113
- package/src/components/AuthingGuard/Forms/SmsMfaVerifyForm/index.tsx +0 -40
- package/src/components/AuthingGuard/Forms/SmsMfaVerifyForm/style.less +0 -3
- package/src/components/AuthingGuard/Forms/SocialAndIdpLogin/index.tsx +0 -325
- package/src/components/AuthingGuard/Forms/SocialAndIdpLogin/style.less +0 -75
- package/src/components/AuthingGuard/Forms/UploadImage/index.tsx +0 -70
- package/src/components/AuthingGuard/Forms/index.ts +0 -13
- package/src/components/AuthingGuard/GuardLayout/index.tsx +0 -488
- package/src/components/AuthingGuard/GuardLayout/style.less +0 -111
- package/src/components/AuthingGuard/Header/index.tsx +0 -28
- package/src/components/AuthingGuard/Header/style.less +0 -64
- package/src/components/AuthingGuard/IconFont/iconfont.js +0 -74
- package/src/components/AuthingGuard/IconFont/index.tsx +0 -19
- package/src/components/AuthingGuard/IconFont/style.less +0 -6
- package/src/components/AuthingGuard/IconFont/svg.js +0 -2
- package/src/components/AuthingGuard/LoginLayout/index.tsx +0 -205
- package/src/components/AuthingGuard/LoginLayout/style.less +0 -0
- package/src/components/AuthingGuard/MfaLayout/Steps.ts +0 -4
- package/src/components/AuthingGuard/MfaLayout/index.tsx +0 -49
- package/src/components/AuthingGuard/MfaLayout/style.less +0 -3
- package/src/components/AuthingGuard/RegisterLayout/index.tsx +0 -89
- package/src/components/AuthingGuard/RegisterLayout/style.less +0 -0
- package/src/components/AuthingGuard/ResetPwdLayout/index.tsx +0 -20
- package/src/components/AuthingGuard/ToggleLang/index.tsx +0 -51
- package/src/components/AuthingGuard/api/appConfig.ts +0 -154
- package/src/components/AuthingGuard/api/http.ts +0 -88
- package/src/components/AuthingGuard/api/index.ts +0 -3
- package/src/components/AuthingGuard/api/sso.ts +0 -29
- package/src/components/AuthingGuard/api/userPoolConfig.ts +0 -112
- package/src/components/AuthingGuard/constants.ts +0 -107
- package/src/components/AuthingGuard/hooks/index.tsx +0 -70
- package/src/components/AuthingGuard/hooks/useScreenSize.tsx +0 -68
- package/src/components/AuthingGuard/index.tsx +0 -134
- package/src/components/AuthingGuard/locales/en/common.json +0 -185
- package/src/components/AuthingGuard/locales/en/index.ts +0 -6
- package/src/components/AuthingGuard/locales/en/login.json +0 -94
- package/src/components/AuthingGuard/locales/en/map.json +0 -4
- package/src/components/AuthingGuard/locales/en/user.json +0 -81
- package/src/components/AuthingGuard/locales/index.ts +0 -45
- package/src/components/AuthingGuard/locales/zh/common.json +0 -185
- package/src/components/AuthingGuard/locales/zh/index.ts +0 -6
- package/src/components/AuthingGuard/locales/zh/login.json +0 -94
- package/src/components/AuthingGuard/locales/zh/map.json +0 -4
- package/src/components/AuthingGuard/locales/zh/user.json +0 -81
- package/src/components/AuthingGuard/style.less +0 -104
- package/src/components/AuthingGuard/types/Forms.ts +0 -95
- package/src/components/AuthingGuard/types/GuardConfig.ts +0 -424
- package/src/components/AuthingGuard/types/GuardState.ts +0 -7
- package/src/components/AuthingGuard/types/Locales.ts +0 -12
- package/src/components/AuthingGuard/types/index.ts +0 -4
- package/src/components/index.ts +0 -7
- package/src/context/base.tsx +0 -28
- package/src/context/global/context.tsx +0 -39
- package/src/context/global/reducer.tsx +0 -56
- package/src/index.tsx +0 -142
- package/src/logo.svg +0 -7
- package/src/react-app-env.d.ts +0 -71
- package/src/reportWebVitals.ts +0 -15
- package/src/setupTests.ts +0 -5
- package/src/utils/clipboard.ts +0 -27
- package/src/utils/index.ts +0 -180
- package/src/utils/popupCenter.ts +0 -48
- package/tsconfig.json +0 -24
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/** eslint-disable */
|
|
2
|
-
/**
|
|
3
|
-
* !!!!!!!!!!!! 注意注意!!!!!!!!!!!!!
|
|
4
|
-
*
|
|
5
|
-
* 只要替换 svgStr 中的字符串即可,为了兼容 SSR!!!!!!
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import { svgStr } from './svg'
|
|
9
|
-
var init = function (a) {
|
|
10
|
-
var c,
|
|
11
|
-
t,
|
|
12
|
-
l,
|
|
13
|
-
e,
|
|
14
|
-
i,
|
|
15
|
-
o,
|
|
16
|
-
h = svgStr,
|
|
17
|
-
m = (m = document.getElementsByTagName('script'))[
|
|
18
|
-
m.length - 1
|
|
19
|
-
].getAttribute('data-injectcss')
|
|
20
|
-
if (m && !a.__iconfont__svg__cssinject__) {
|
|
21
|
-
a.__iconfont__svg__cssinject__ = !0
|
|
22
|
-
try {
|
|
23
|
-
document.write(
|
|
24
|
-
'<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>'
|
|
25
|
-
)
|
|
26
|
-
} catch (a) {
|
|
27
|
-
console && console.log(a)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function n() {
|
|
31
|
-
i || ((i = !0), l())
|
|
32
|
-
}
|
|
33
|
-
;(c = function () {
|
|
34
|
-
var a, c, t
|
|
35
|
-
;((t = document.createElement('div')).innerHTML = h),
|
|
36
|
-
(h = null),
|
|
37
|
-
(c = t.getElementsByTagName('svg')[0]) &&
|
|
38
|
-
(c.setAttribute('aria-hidden', 'true'),
|
|
39
|
-
(c.style.position = 'absolute'),
|
|
40
|
-
(c.style.width = 0),
|
|
41
|
-
(c.style.height = 0),
|
|
42
|
-
(c.style.overflow = 'hidden'),
|
|
43
|
-
(a = c),
|
|
44
|
-
(t = document.body).firstChild
|
|
45
|
-
? (c = t.firstChild).parentNode.insertBefore(a, c)
|
|
46
|
-
: t.appendChild(a))
|
|
47
|
-
}),
|
|
48
|
-
document.addEventListener
|
|
49
|
-
? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState)
|
|
50
|
-
? setTimeout(c, 0)
|
|
51
|
-
: ((t = function () {
|
|
52
|
-
document.removeEventListener('DOMContentLoaded', t, !1), c()
|
|
53
|
-
}),
|
|
54
|
-
document.addEventListener('DOMContentLoaded', t, !1))
|
|
55
|
-
: document.attachEvent &&
|
|
56
|
-
((l = c),
|
|
57
|
-
(e = a.document),
|
|
58
|
-
(i = !1),
|
|
59
|
-
(o = function () {
|
|
60
|
-
try {
|
|
61
|
-
e.documentElement.doScroll('left')
|
|
62
|
-
} catch (a) {
|
|
63
|
-
return void setTimeout(o, 50)
|
|
64
|
-
}
|
|
65
|
-
n()
|
|
66
|
-
})(),
|
|
67
|
-
(e.onreadystatechange = function () {
|
|
68
|
-
'complete' == e.readyState && ((e.onreadystatechange = null), n())
|
|
69
|
-
}))
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {
|
|
73
|
-
init(window)
|
|
74
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react'
|
|
2
|
-
import { getClassnames } from '../../../utils'
|
|
3
|
-
import './iconfont'
|
|
4
|
-
import './style.less'
|
|
5
|
-
|
|
6
|
-
export const IconFont: FC<{
|
|
7
|
-
type: string
|
|
8
|
-
style?: React.CSSProperties
|
|
9
|
-
className?: string
|
|
10
|
-
}> = ({ type, style, className }) => {
|
|
11
|
-
return (
|
|
12
|
-
<svg
|
|
13
|
-
style={{ ...style }}
|
|
14
|
-
className={getClassnames(['authing-icon', className])}
|
|
15
|
-
>
|
|
16
|
-
<use xlinkHref={`#${type}`}></use>
|
|
17
|
-
</svg>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const svgStr =
|
|
2
|
-
'<svg><symbol id="authing-gitlab" viewBox="0 0 1024 1024"><path d="M958.326 570.912l-50.136-154.3L808.827 110.8c-5.111-15.733-27.372-15.733-32.485 0l-99.365 305.812H347.024L247.656 110.8c-5.11-15.733-27.37-15.733-32.484 0l-99.363 305.812-50.134 154.3c-4.575 14.073 0.437 29.49 12.407 38.19L512 924.358 945.92 609.1a34.16 34.16 0 0 0 12.407-38.19" ></path></symbol><symbol id="authing-yuyan" viewBox="0 0 1024 1024"><path d="M960 511.616A447.808 447.808 0 0 0 512 64C264.576 64 64 264.384 64 511.616a447.808 447.808 0 0 0 392.32 444.16 224.384 224.384 0 0 0 60.352 3.456A447.744 447.744 0 0 0 960 511.616z m-64 6.4a437.952 437.952 0 0 0-8.768-65.472c0.384-7.616 0.512-14.784 0.256-21.504 5.696 26.496 8.512 53.504 8.512 80.64v6.272z m-768-6.4c0-26.56 2.752-53.12 8.192-79.104 16.576 17.728 55.68 17.28 65.216-9.216 17.024 10.176 39.936 12.032 39.936 32.32 0 67.072 2.432 138.944 63.36 140.032 1.664 0 33.92 12.224 49.28 52.096 5.312 13.76 26.304 0 49.344 0 11.52 0 0 19.328 0 61.184 0 41.92 89.92 105.984 89.92 105.984-0.384 27.584 0.768 49.92 3.008 67.712a150.912 150.912 0 0 0-50.816 6.848A383.68 383.68 0 0 1 128 511.616z m478.592 371.968c-2.048-9.728-10.752-15.04-26.624-10.88 12.672-54.016 18.816-84.288 45.312-107.2 38.272-33.216 4.48-70.144-24.576-65.792-23.04 3.456-8.448-28.416-29.056-30.208-20.544-1.728-47.232-42.432-76.736-56.512-15.616-7.424-30.976-27.328-55.104-28.16-21.376-0.832-52.672 18.048-52.672 3.456 0-46.912-4.8-80.448-5.76-93.76-0.768-10.752-7.04-3.648 21.888-2.944 15.744 0.384 8.064-31.616 23.616-32.832 15.296-1.28 51.712 14.272 60.992 8.128 8.64-5.76 63.36 143.744 63.36 24.704 0-14.08-7.296-38.72 0-52.096 28.992-52.864 56.064-95.936 53.632-102.208-1.344-3.584-29.568-6.464-52.16 1.088-7.68 2.56 2.432 14.464-8.512 17.024-41.024 9.472-77.248-11.072-64.64-30.336 13.056-19.84 60.16-8.64 64.256-48.256 2.368-22.72 4.352-49.088 5.632-68.608 55.232 8.64 49.152-71.616-32.896-80.192a384.128 384.128 0 0 1 358.272 257.92 15.552 15.552 0 0 0-9.152-4.16c-24.832-62.016-84.992-17.152-64.64 37.504-109.44 84.16-81.408 142.784-45.44 176.384 18.944 17.728 36.992 44.288 48.704 63.36-12.8 37.248 47.104 22.336 76.672-40.96a384.576 384.576 0 0 1-274.432 265.6z" ></path></symbol><symbol id="authing-anzhuo" viewBox="0 0 1024 1024"><path d="M141.1 331.2c-35 0-63.3 28.3-63.3 63.2v264.7c0 34.9 28.4 63.2 63.3 63.2 35 0 63.3-28.3 63.3-63.2V394.4c0-34.9-28.3-63.2-63.3-63.2zM228.9 753.3c0 37.3 30.3 67.5 67.6 67.5h46.1v140c0 34.9 28.4 63.2 63.3 63.2 35 0 63.3-28.3 63.3-63.2v-140h85.5v140c0 34.9 28.4 63.2 63.3 63.2 35 0 63.3-28.3 63.3-63.2v-140h46.1c37.3 0 67.6-30.2 67.6-67.5V343.1H228.9v410.2zM651.8 93.4L696 13c2.4-4.2 0.8-9.6-3.5-11.9-4.2-2.3-9.6-0.8-11.9 3.5l-44.7 81.2C598.4 69.2 556.4 59.9 512 59.9c-44.4 0-86.4 9.3-123.9 25.8L343.4 4.6c-2.3-4.3-7.7-5.8-11.9-3.5-4.3 2.3-5.9 7.7-3.5 11.9l44.2 80.4c-86.8 44.8-145.5 130-145.5 227.7h570.5c0.1-97.8-58.6-182.9-145.4-227.7zM382.2 218c-13.2 0-23.9-10.7-23.9-23.9s10.7-23.9 23.9-23.9 23.9 10.7 23.9 23.9c-0.1 13.2-10.8 23.9-23.9 23.9z m259.7 0c-13.2 0-23.9-10.7-23.9-23.9s10.7-23.9 23.9-23.9 23.9 10.7 23.9 23.9c-0.1 13.2-10.8 23.9-23.9 23.9zM882.9 331.2c-35 0-63.3 28.3-63.3 63.2v264.7c0 34.9 28.4 63.2 63.3 63.2 35 0 63.3-28.3 63.3-63.2V394.4c0-34.9-28.3-63.2-63.3-63.2z" ></path></symbol><symbol id="authing-lark-public" viewBox="0 0 1024 1024"><path d="M933.875 98.5625L726.53414917 322.64486695a6.61651612 6.61651612 0 0 0-1.64300537 5.81726073 40.54449463 40.54449463 0 0 1-68.92053223 36.37023927L490.72827148 530.02856445l16.29821778 218.30960083L692.5625 933.875z m0 0" ></path><path d="M931.6098938 104.2026062l-205.12023926 221.68377685a6.61651612 6.61651612 0 0 0-1.64300537 5.86175538 39.96688843 39.96688843 0 0 1-68.21026612 35.92611694L494.23675537 530.07388305a3.28601074 3.28601074 0 0 0-0.93273925 2.53125l16.03125 214.40148927 413.61547851-623.97537232 8.88162232-18.74047852z m0 0" ></path><path d="M925.48199463 90.16949463L701.39880372 297.46502685a6.61651612 6.61651612 0 0 1-5.86175538 1.68832398 40.54449463 40.54449463 0 0 0-36.32574462 68.92053222L493.97143555 533.31622315l-218.22143555-16.43005372L90.125 331.43667602z m0 0" ></path><path d="M919.8427124 92.65625l-221.77359008 205.12023926a6.61651612 6.61651612 0 0 1-5.77276612 1.64300537 39.96688843 39.96688843 0 0 0-35.92611695 68.21026612L493.92611695 530.02938843a3.28601074 3.28601074 0 0 1-2.57574463 0.93273925l-214.40148927-16.03125L900.96875 101.31539917l18.74047852-8.88079834z m0 0" ></path></symbol><symbol id="authing-lark-internal" viewBox="0 0 1024 1024"><path d="M933.875 98.5625L726.53414917 322.64486695a6.61651612 6.61651612 0 0 0-1.64300537 5.81726073 40.54449463 40.54449463 0 0 1-68.92053223 36.37023927L490.72827148 530.02856445l16.29821778 218.30960083L692.5625 933.875z m0 0" ></path><path d="M931.6098938 104.2026062l-205.12023926 221.68377685a6.61651612 6.61651612 0 0 0-1.64300537 5.86175538 39.96688843 39.96688843 0 0 1-68.21026612 35.92611694L494.23675537 530.07388305a3.28601074 3.28601074 0 0 0-0.93273925 2.53125l16.03125 214.40148927 413.61547851-623.97537232 8.88162232-18.74047852z m0 0" ></path><path d="M925.48199463 90.16949463L701.39880372 297.46502685a6.61651612 6.61651612 0 0 1-5.86175538 1.68832398 40.54449463 40.54449463 0 0 0-36.32574462 68.92053222L493.97143555 533.31622315l-218.22143555-16.43005372L90.125 331.43667602z m0 0" ></path><path d="M919.8427124 92.65625l-221.77359008 205.12023926a6.61651612 6.61651612 0 0 1-5.77276612 1.64300537 39.96688843 39.96688843 0 0 0-35.92611695 68.21026612L493.92611695 530.02938843a3.28601074 3.28601074 0 0 1-2.57574463 0.93273925l-214.40148927-16.03125L900.96875 101.31539917l18.74047852-8.88079834z m0 0" ></path></symbol><symbol id="authing-guanbi7-01copy_1" viewBox="0 0 1024 1024"><path d="M0.00007 512.306485a511.999485 511.999485 0 0 1 1023.99797-0.512v0.512a510.974486 510.974486 0 0 1-511.999485 511.691485C228.86384 1023.99797 0.00007 794.725201 0.00007 512.306485z m546.200451 0l178.89282-178.78982a23.244977 23.244977 0 0 0 0-33.075967l-1.126999-1.023999a23.244977 23.244977 0 0 0-33.176967 0L511.999555 478.514519l-178.78982-179.19982a23.244977 23.244977 0 0 0-33.177967 0l-1.023999 1.023999a23.244977 23.244977 0 0 0 0 33.074967l178.78982 179.199819-178.89282 178.789821a23.244977 23.244977 0 0 0 0 33.177966l1.126999 1.023999a23.244977 23.244977 0 0 0 33.176967 0L511.999555 547.12245 690.789375 725.80927a23.244977 23.244977 0 0 0 33.177967 0l1.023999-1.023999a23.244977 23.244977 0 0 0 0-33.176967l-178.78982-179.199819z" ></path></symbol><symbol id="authing-guanbi" viewBox="0 0 1024 1024"><path d="M583.168 523.776L958.464 148.48c18.944-18.944 18.944-50.176 0-69.12l-2.048-2.048c-18.944-18.944-50.176-18.944-69.12 0L512 453.12 136.704 77.312c-18.944-18.944-50.176-18.944-69.12 0l-2.048 2.048c-19.456 18.944-19.456 50.176 0 69.12l375.296 375.296L65.536 899.072c-18.944 18.944-18.944 50.176 0 69.12l2.048 2.048c18.944 18.944 50.176 18.944 69.12 0L512 594.944 887.296 970.24c18.944 18.944 50.176 18.944 69.12 0l2.048-2.048c18.944-18.944 18.944-50.176 0-69.12L583.168 523.776z" ></path></symbol><symbol id="authing-apple-web" viewBox="0 0 1024 1024"><path d="M797.3 656c24.6 34.8 52.8 57.3 84.6 67.5-13.8 42.6-35.7 87-65.7 133.2-46.2 69.6-91.8 104.4-136.8 104.4-16.8 0-41.7-5.7-74.7-17.1-30.6-11.4-57.3-17.1-80.1-17.1-22.8 0-48 6-75.6 18-28.8 11.4-52.5 17.1-71.1 17.1-54 0-107.1-45.9-159.3-137.7-52.2-90.6-78.3-179.7-78.3-267.3 0-81 19.8-147.3 59.4-198.9 40.8-51.6 91.2-77.4 151.2-77.4 13.2 0 27.9 1.65 44.1 4.95 16.2 3.3 33 9.45 50.4 18.45 18.6 10.2 33.9 17.25 45.9 21.15 12 3.9 21.3 5.85 27.9 5.85 7.8 0 19.8-1.8 36-5.4a166.088 166.088 0 0 0 48.6-19.8 366.113 366.113 0 0 1 45-21.6c12.6-4.8 25.5-7.2 38.7-7.2 42 0 79.8 11.4 113.4 34.2 18 12 36.3 29.7 54.9 53.1-27.6 24-47.7 45-60.3 63-23.4 33.6-35.1 70.2-35.1 109.8 0 43.8 12.3 83.4 36.9 118.8zM616.4 235.7c-21 19.8-40.2 32.7-57.6 38.7-6 1.8-13.65 3.45-22.95 4.95-9.3 1.5-19.95 2.85-31.95 4.05 0.6-52.8 14.4-98.4 41.4-136.8 27-38.4 71.4-64.8 133.2-79.2 1.2 6 2.1 10.2 2.7 12.6v9.9c0 21.6-5.1 45.9-15.3 72.9a221.625 221.625 0 0 1-49.5 72.9z" ></path></symbol><symbol id="authing-google" viewBox="0 0 1024 1024"><path d="M1000 523.6c0 283-193.8 484.4-480 484.4-274.4 0-496-221.6-496-496S245.6 16 520 16c133.6 0 246 49 332.6 129.8l-135 129.8c-176.6-170.4-505-42.4-505 236.4 0 173 138.2 313.2 307.4 313.2 196.4 0 270-140.8 281.6-213.8H520V440.8h472.2c4.6 25.4 7.8 49.8 7.8 82.8z" ></path></symbol><symbol id="authing-dingtalk" viewBox="0 0 1024 1024"><path d="M905.857912 382.800144a192.415957 192.415957 0 0 1-12.101998 31.649993h0.186l-0.744 1.257c-35.140992 76.657983-126.881972 226.998949-126.881971 226.998949s-0.093-0.373-0.466-0.93l-26.856994 47.567989h129.301971L621.375975 1024l56.039988-227.649949H575.715986l35.326992-150.525966a1436.834677 1436.834677 0 0 0-102.397977 29.789993s-54.130988 32.393993-155.923965-62.137986c0 0-68.699985-61.672986-28.857994-77.079982 16.941996-6.560999 82.197982-14.892997 133.53597-21.967996 69.444984-9.494998 112.172975-14.614997 112.172975-14.614996s-214.106952 3.257999-264.83994-4.886999c-50.732989-8.099998-115.104974-94.484979-128.834972-170.353962 0 0-21.223995-41.702991 45.65999-21.968995 66.838985 19.734996 343.499923 76.799983 343.499923 76.799983S205.267069 266.95017 181.250074 239.487176c-23.922995-27.459994-70.374984-149.732966-64.324985-224.901949 0 0 2.606999-18.757996 21.457995-13.729997 0 0 266.00294 123.946972 447.852899 191.762957 181.896959 67.815985 340.009924 102.398977 319.622929 190.181957z" ></path></symbol><symbol id="authing-apple" viewBox="0 0 1024 1024"><path d="M797.3 656c24.6 34.8 52.8 57.3 84.6 67.5-13.8 42.6-35.7 87-65.7 133.2-46.2 69.6-91.8 104.4-136.8 104.4-16.8 0-41.7-5.7-74.7-17.1-30.6-11.4-57.3-17.1-80.1-17.1-22.8 0-48 6-75.6 18-28.8 11.4-52.5 17.1-71.1 17.1-54 0-107.1-45.9-159.3-137.7-52.2-90.6-78.3-179.7-78.3-267.3 0-81 19.8-147.3 59.4-198.9 40.8-51.6 91.2-77.4 151.2-77.4 13.2 0 27.9 1.65 44.1 4.95 16.2 3.3 33 9.45 50.4 18.45 18.6 10.2 33.9 17.25 45.9 21.15 12 3.9 21.3 5.85 27.9 5.85 7.8 0 19.8-1.8 36-5.4a166.088 166.088 0 0 0 48.6-19.8 366.113 366.113 0 0 1 45-21.6c12.6-4.8 25.5-7.2 38.7-7.2 42 0 79.8 11.4 113.4 34.2 18 12 36.3 29.7 54.9 53.1-27.6 24-47.7 45-60.3 63-23.4 33.6-35.1 70.2-35.1 109.8 0 43.8 12.3 83.4 36.9 118.8zM616.4 235.7c-21 19.8-40.2 32.7-57.6 38.7-6 1.8-13.65 3.45-22.95 4.95-9.3 1.5-19.95 2.85-31.95 4.05 0.6-52.8 14.4-98.4 41.4-136.8 27-38.4 71.4-64.8 133.2-79.2 1.2 6 2.1 10.2 2.7 12.6v9.9c0 21.6-5.1 45.9-15.3 72.9a221.625 221.625 0 0 1-49.5 72.9z" ></path></symbol><symbol id="authing-alipay-web" viewBox="0 0 1024 1024"><path d="M427.154 210.262l-1.819 59.431H185.792v45.481h242.573v78.84H228.24v43.057l203.153-1.823 203.76-1.818-3.641 14.553c-9.094 35.177-47.907 129.173-55.183 132.196-4.244 1.216-33.961-5.458-67.316-15.16-101.276-30.924-151.61-40.023-220.136-40.023-69.74 0.603-115.217 13.342-158.886 44.27-84.897 60.647-91.57 179.506-12.735 245.602 83.687 70.348 220.739 77.017 345.06 16.375 44.267-21.225 123.71-78.84 150.39-108.553l10.922-12.736 34.57 16.98c34.568 17.586 248.03 116.437 284.413 131.598l19.403 8.49V711.17l-52.762-13.95c-47.907-12.74-170.406-50.94-209.826-66.105l-15.16-6.066 20.012-41.238c21.231-42.444 63.68-162.522 63.68-180.108 0-8.491-12.128-9.702-106.128-9.702H555.71v-78.827h254.704v-40.022c0-1.817-57.614-3.032-127.353-2.425l-127.347 0.602V151.437H428.967l-1.813 58.825z m-23.657 395.392c31.535 10.922 73.382 27.896 92.786 38.206l35.167 18.805-19.404 24.255c-10.913 13.342-35.775 36.387-56.399 51.548-69.133 51.542-133.41 71.553-215.887 66.703-86.112-4.852-132.201-40.023-137.66-105.517-3.64-40.63 5.459-63.675 33.359-84.901 35.172-26.685 63.67-32.742 141.296-30.924 59.431 1.814 78.232 5.449 126.742 21.825z" ></path></symbol><symbol id="authing-wechat-miniprogram-app-launch" viewBox="0 0 1126 1024"><path d="M961.876 262.606C900.851 134.702 747.238 80.676 619.77 141.425c-69.45 33.34-113.232 90.332-130.04 168.839-15.583 71.308-6.328 150.685 2.926 211.869 12.22 78.071 12.656 135.459 1.7 176.393-9.69 36.306-29.464 59.957-61.46 75.54a135.814 135.814 0 0 1-104.372 5.102 137.634 137.634 0 0 1-77.835-69.647 136.764 136.764 0 0 1 64.388-181.93c14.317-7.12 25.668-19.38 30.73-34.607 5.023-15.187 4.628-31.244-2.136-45.996a60.511 60.511 0 0 0-34.487-30.81 61.54 61.54 0 0 0-45.878 2.136 256.284 256.284 0 0 0-131.86 145.98 257.233 257.233 0 0 0 10.284 196.72 256.403 256.403 0 0 0 231.802 146.494 263.007 263.007 0 0 0 110.265-24.916c69.41-33.341 113.192-89.462 130.04-167.97 15.149-70.913 6.328-150.29-2.966-210.603-12.22-78.942-12.656-136.764-1.701-177.698 9.69-36.307 29.465-60.354 62.292-75.54a136.962 136.962 0 0 1 182.205 64.585 136.764 136.764 0 0 1-64.387 181.93 60.511 60.511 0 0 0-28.16 80.167c6.724 14.753 19.34 25.708 34.053 30.81 15.148 5.063 31.166 4.628 45.877-2.135 127.51-62.45 181.378-216.101 120.786-343.531z" ></path></symbol><symbol id="authing-qq" viewBox="0 0 1024 1024"><path d="M821.295 699.385a275.463 275.463 0 0 1-57.3 90.76c54.54 16.634 41.202 45.496 41.202 45.496 24.223 13.299 22.69 99.729-111.381 98.195-89.38-0.996-127.248-26.062-142.695-42.735-11.498 1.15-23.035 1.802-34.61 1.84-14.296 0-28.286-1.073-42.084-2.645-14.91 16.634-52.586 42.544-143.308 43.54-133.879 1.534-135.412-84.895-111.15-98.195 0 0-14.642-31.046 47.142-47.335a272.511 272.511 0 0 1-58.794-98.311c-56.035 99.537-83.057 33.575-79.033-42.66 3.604-67.687 63.241-144.61 78.726-163.43a60.98 60.98 0 0 1-4.6-22.804c0-16.482 6.593-31.506 17.363-42.775a44.844 44.844 0 0 1 20.045-46.223c-0.076-2.414-0.306-4.753-0.306-7.206 0-151.394 123.569-274.235 275.96-274.235 152.469 0 275.961 122.802 275.961 274.235 0 4.6-0.268 9.122-0.498 13.645 10.425 10.617 14.947 25.68 11.998 40.283 10.616 11.192 17.36 25.871 17.36 42.276 0 8.125-1.723 15.829-4.598 22.997 15.56 19.163 74.816 96.01 78.38 163.698 3.91 74.164-21.31 138.67-73.78 51.589z" ></path></symbol><symbol id="authing-wechat-mobile" viewBox="0 0 1239 1024"><path d="M745.256 511.245c-21.665 0-43.385 20.373-43.385 45.595 0 20.373 21.72 40.96 43.385 40.96 32.553 0 55.835-20.587 55.835-40.96 0-25.222-23.282-45.595-55.835-45.595M602.705 298.9c34.115 0 55.78-22.097 55.78-55.08 0-34.655-21.665-55.027-55.78-55.027-32.499 0-63.488 20.372-63.488 54.973 0 33.091 30.99 55.08 63.488 55.08M440.05 756.574c-57.344 0-99.167-9.431-153.439-25.169l-156.456 80.196 44.948-135.222C65.051 597.747 0 498.58 0 377.479 0 163.57 198.333 0 440.05 0c213.8 0 404.427 128.97 441.56 311.458a211.106 211.106 0 0 0-41.822-4.743c-210.729 0-373.383 160.498-373.383 353.927 0 33.037 4.635 62.895 12.396 94.37-12.396 1.616-26.409 1.616-38.804 1.616m646.198 154.14L1117.13 1024l-117.76-67.638c-44.894 9.378-88.28 23.606-133.228 23.606-207.656 0-371.873-144.761-371.873-324.07 0-179.253 164.217-323.96 371.873-323.96 196.77 0 373.437 144.707 373.437 323.907 0 100.783-66.614 190.356-153.384 254.922M295.882 188.793c-32.498 0-66.614 20.372-66.614 54.973 0 33.091 34.116 55.08 66.614 55.08 30.99 0 55.781-21.989 55.781-55.026 0-34.655-24.791-55.027-55.78-55.027m692.6 322.452c-23.228 0-43.385 20.373-43.385 45.595 0 20.373 20.157 40.96 43.385 40.96 30.99 0 54.272-20.587 54.272-40.96 0-25.222-23.282-45.595-54.272-45.595" ></path></symbol><symbol id="authing-baidu" viewBox="0 0 1024 1024"><path d="M204.8 537.876c104.422-22.429 90.196-147.185 86.967-174.501-5.149-42.066-54.545-115.55-121.658-109.746-84.48 7.593-96.873 129.6-96.873 129.6C61.891 439.695 100.64 560.262 204.8 537.876zM315.636 754.75c-3.141 8.858-9.861 31.244-4.058 50.75 11.607 43.766 49.658 45.774 49.658 45.774h54.677V717.658H357.44c-26.27 7.855-39.01 28.407-41.847 37.091z m82.779-426.022c57.774 0 104.29-66.37 104.29-148.407C502.705 98.327 456.19 32 398.415 32c-57.47 0-104.16 66.37-104.16 148.32 0 82.036 46.69 148.364 104.29 148.364z m248.334 9.731c77.062 10.037 126.676-72.262 136.407-134.618 10.037-62.138-39.665-134.53-94.21-146.924-54.633-12.523-122.88 75.055-129.077 132.131-7.418 69.818 9.95 139.462 86.88 149.411zM835.564 704.83s-119.259-92.247-188.815-191.913c-94.254-147.01-228.349-87.185-273.164-12.48-44.64 74.75-114.196 122.095-124.014 134.531-10.036 12.393-144 84.655-114.327 216.742 29.76 132 134.269 129.6 134.269 129.6s76.974 7.55 166.342-12.393c89.323-19.898 166.21 4.975 166.21 4.975s208.67 69.818 265.746-64.713C924.8 774.56 835.564 704.83 835.564 704.83zM478.487 905.076H342.865c-58.56-11.738-81.905-51.665-84.916-58.472-2.924-6.982-19.505-39.142-10.69-93.819 25.308-81.905 97.483-87.796 97.483-87.796h72.218v-88.844l61.484 0.96 0.087 327.928z m252.742-0.96H575.011c-60.524-15.534-63.316-58.56-63.316-58.56V672.844l63.36-1.004v155.127c3.84 16.495 24.436 19.637 24.436 19.637h64.32v-173.76h67.418v231.272z m220.975-461.018c0-29.847-24.742-119.65-116.64-119.65-92.073 0-104.335 84.741-104.335 144.654 0 57.163 4.887 137.062 119.127 134.443 114.415-2.443 101.848-129.469 101.848-159.447z" ></path></symbol><symbol id="authing-wechat-pc" viewBox="0 0 1239 1024"><path d="M727.677 511.336c-19.042 0-38.132 17.906-38.132 40.074 0 17.906 19.09 36 38.132 36 28.61 0 49.074-18.094 49.074-36 0-22.168-20.463-40.074-49.074-40.074m-125.29-186.63c29.985 0 49.026-19.422 49.026-48.411 0-30.459-19.041-48.364-49.025-48.364-28.564 0-55.8 17.905-55.8 48.316 0 29.084 27.237 48.41 55.8 48.41m-142.959 402.3c-50.4 0-87.158-8.288-134.858-22.12L187.06 775.32l39.505-118.847c-96.726-69.11-153.9-156.269-153.9-262.705C72.667 205.763 246.984 62 459.43 62c187.91 0 355.454 113.353 388.09 273.742a185.542 185.542 0 0 0-36.757-4.168c-185.211 0-328.17 141.062-328.17 311.068 0 29.037 4.075 55.28 10.896 82.943-10.895 1.42-23.211 1.42-34.105 1.42M1027.33 862.48l27.19 99.52-103.5-59.447c-39.458 8.242-77.59 20.747-117.096 20.747-182.51 0-326.841-127.231-326.841-284.827 0-157.547 144.331-284.73 326.841-284.73 172.943 0 328.216 127.183 328.216 284.683 0 88.58-58.547 167.305-134.81 224.053M332.72 227.93c-28.563 0-58.548 17.905-58.548 48.316 0 29.084 29.985 48.41 58.547 48.41 27.238 0 49.026-19.326 49.026-48.362 0-30.459-21.788-48.364-49.025-48.364m608.73 283.405c-20.415 0-38.13 17.906-38.13 40.074 0 17.906 17.715 36 38.13 36 27.238 0 47.7-18.094 47.7-36 0-22.168-20.462-40.074-47.7-40.074" ></path></symbol><symbol id="authing-wechat-miniprogram-qrconnec" viewBox="0 0 1126 1024"><path d="M961.876 262.606C900.851 134.702 747.238 80.676 619.77 141.425c-69.45 33.34-113.232 90.332-130.04 168.839-15.583 71.308-6.328 150.685 2.926 211.869 12.22 78.071 12.656 135.459 1.7 176.393-9.69 36.306-29.464 59.957-61.46 75.54a135.814 135.814 0 0 1-104.372 5.102 137.634 137.634 0 0 1-77.835-69.647 136.764 136.764 0 0 1 64.388-181.93c14.317-7.12 25.668-19.38 30.73-34.607 5.023-15.187 4.628-31.244-2.136-45.996a60.511 60.511 0 0 0-34.487-30.81 61.54 61.54 0 0 0-45.878 2.136 256.284 256.284 0 0 0-131.86 145.98 257.233 257.233 0 0 0 10.284 196.72 256.403 256.403 0 0 0 231.802 146.494 263.007 263.007 0 0 0 110.265-24.916c69.41-33.341 113.192-89.462 130.04-167.97 15.149-70.913 6.328-150.29-2.966-210.603-12.22-78.942-12.656-136.764-1.701-177.698 9.69-36.307 29.465-60.354 62.292-75.54a136.962 136.962 0 0 1 182.205 64.585 136.764 136.764 0 0 1-64.387 181.93 60.511 60.511 0 0 0-28.16 80.167c6.724 14.753 19.34 25.708 34.053 30.81 15.148 5.063 31.166 4.628 45.877-2.135 127.51-62.45 181.378-216.101 120.786-343.531z" ></path></symbol><symbol id="authing-wechat-webpage-authorization" viewBox="0 0 1188 1024"><path d="M512 1.896C229.452 1.896 0 229.452 0 512s229.452 510.104 512 510.104S1022.104 794.548 1022.104 512 794.548 1.896 512 1.896z m-91.022 629.57c-26.548 0-49.304-5.688-75.852-11.377l-75.852 37.926 22.756-66.37c-54.993-37.926-87.23-87.23-87.23-147.912 0-104.296 98.607-185.837 218.074-185.837 108.089 0 201.007 64.474 219.97 153.6-7.585 0-13.274-1.896-20.859-1.896-104.296 0-185.837 77.748-185.837 172.563 0 15.17 1.896 30.34 7.585 45.511-7.585 3.793-15.17 3.793-22.755 3.793z m322.37 77.749l17.067 54.992-58.785-34.133c-22.756 5.689-43.615 11.378-66.37 11.378-104.297 0-185.838-70.163-185.838-157.393S530.963 424.77 635.26 424.77c98.608 0 185.837 70.163 185.837 159.29 0 47.407-32.237 91.021-77.748 125.155z" fill="#46BB36" ></path><path d="M318.578 379.26c0 17.066 13.274 30.34 30.34 30.34s30.341-13.274 30.341-30.34-13.274-30.341-30.34-30.341-30.341 13.274-30.341 30.34z m235.14 159.288c0 13.274 11.378 24.652 24.652 24.652 13.274 0 24.652-11.378 24.652-24.652 0-13.274-11.378-24.652-24.652-24.652-13.274-1.896-24.651 9.482-24.651 24.652z m-81.54-159.289c0 17.067 13.274 30.341 30.34 30.341 17.067 0 30.341-13.274 30.341-30.34 0-17.067-13.274-30.341-30.34-30.341-17.067 0-30.341 13.274-30.341 30.34zM675.08 538.55c0 13.273 11.378 24.651 24.652 24.651 13.274 0 24.652-11.378 24.652-24.652 0-13.274-11.378-24.652-24.652-24.652-13.274-1.896-24.652 9.482-24.652 24.652z" fill="#46BB36" ></path></symbol><symbol id="authing-wechat-miniprogram-default" viewBox="0 0 1126 1024"><path d="M961.876 262.606C900.851 134.702 747.238 80.676 619.77 141.425c-69.45 33.34-113.232 90.332-130.04 168.839-15.583 71.308-6.328 150.685 2.926 211.869 12.22 78.071 12.656 135.459 1.7 176.393-9.69 36.306-29.464 59.957-61.46 75.54a135.814 135.814 0 0 1-104.372 5.102 137.634 137.634 0 0 1-77.835-69.647 136.764 136.764 0 0 1 64.388-181.93c14.317-7.12 25.668-19.38 30.73-34.607 5.023-15.187 4.628-31.244-2.136-45.996a60.511 60.511 0 0 0-34.487-30.81 61.54 61.54 0 0 0-45.878 2.136 256.284 256.284 0 0 0-131.86 145.98 257.233 257.233 0 0 0 10.284 196.72 256.403 256.403 0 0 0 231.802 146.494 263.007 263.007 0 0 0 110.265-24.916c69.41-33.341 113.192-89.462 130.04-167.97 15.149-70.913 6.328-150.29-2.966-210.603-12.22-78.942-12.656-136.764-1.701-177.698 9.69-36.307 29.465-60.354 62.292-75.54a136.962 136.962 0 0 1 182.205 64.585 136.764 136.764 0 0 1-64.387 181.93 60.511 60.511 0 0 0-28.16 80.167c6.724 14.753 19.34 25.708 34.053 30.81 15.148 5.063 31.166 4.628 45.877-2.135 127.51-62.45 181.378-216.101 120.786-343.531z" ></path></symbol><symbol id="authing-wechatwork-service-provider-authorization" viewBox="0 0 1182 1024"><path d="M993.598 913.02a7.062 7.062 0 0 1 4.908 2.224c15.678 17.761 37.252 31.073 59.816 35.505 15.713 3.354 26.482 18.873 26.482 36.634 0 19.968-14.706 36.617-32.362 36.617-16.666 0-30.402-14.424-32.361-32.185-4.909-25.53-15.714-47.722-30.42-65.466-0.971-1.112-1.942-3.337-2.931-5.561 0-4.432 2.93-7.768 6.868-7.768zM1024 0a105.931 105.931 0 0 1 105.931 105.949v453.42h-70.62V247.172H70.46v670.88h452.026v70.638H32.84C15.572 988.69 0.829 975.448 0 958.27v-857.9C2.79 44.19 49.346 0.053 105.843 0zM812.138 512c136.651 0 247.172 97.774 247.172 219.224h-60.804c0-101.888-85.663-162.286-182.22-163.045-117.565-0.918-189.686 76.182-193.553 157.184-2.471 51.412 16.42 92.495 61.617 127.47 5.032 4.131 4.184 17.479 3.178 23.658l-2.684 37.34s1.006 0 2.013-1.023l49.982-25.141a16.455 16.455 0 0 1 12.058-1.042c22.104 6.18 37.676 5.509 60.787 5.509 24.117 0 46.857-2.066 64.23-8.087l15.589 55.085a288.662 288.662 0 0 1-78.371 11.317c-25.124 0-49.24-3.09-72.334-9.27l-53.265 26.766c-5.014 2.065-12.059 3.09-18.08 3.09-6.037 0-12.058-2.066-17.09-5.138-10.045-7.221-15.06-19.562-14.053-34.993v-1.041l5.014-42.196c-49.222-40.148-76.358-97.775-76.358-157.484C564.966 609.792 675.486 512 812.138 512z m338.397 330.399c17.655 0 32.362 16.649 32.362 36.634 0 18.856-12.747 34.393-28.443 36.617-22.563 5.544-42.178 17.761-57.874 34.41a21.186 21.186 0 0 1-4.908 3.32c-3.92 0-6.868-3.32-6.868-7.769 0-2.225 0.99-4.431 1.978-5.544 15.678-17.76 27.454-42.178 31.373-67.707 2.948-17.744 16.684-29.961 32.38-29.961z m-141.242-30.261c3.92 0 6.868 3.337 6.868 7.768a9.075 9.075 0 0 1-1.977 5.544c-15.678 17.761-27.454 42.178-31.374 67.708-2.948 17.743-16.684 29.96-32.38 29.96-17.654 0-32.361-16.648-32.361-36.634 0-18.856 12.747-34.392 28.442-36.617 22.564-5.544 42.179-17.743 57.874-34.392 0.971-1.113 2.93-2.225 4.908-3.337z m39.23-70.62c16.667 0 30.402 14.424 32.362 32.185 4.908 25.511 15.713 47.722 30.42 65.465 1.942 1.112 1.942 3.337 2.93 5.561 0 4.432-2.93 7.769-6.867 7.769a7.062 7.062 0 0 1-4.908-2.225c-15.696-17.761-37.253-31.073-59.816-35.504-15.713-3.355-26.483-18.874-26.483-36.635 0-19.968 14.707-36.617 32.362-36.617zM511.912 70.584a53.177 53.177 0 0 0-37.5 15.537 53 53 0 0 0 17.426 86.422 53.407 53.407 0 0 0 58.05-11.582 52.824 52.824 0 0 0 11.388-57.838 53.23 53.23 0 0 0-49.364-32.539z m-176.605 0a53.177 53.177 0 0 0-37.5 15.537 53 53 0 0 0 17.426 86.422 53.407 53.407 0 0 0 58.05-11.582 52.824 52.824 0 0 0 11.388-57.838 53.23 53.23 0 0 0-49.364-32.539z m-176.499 0a53.177 53.177 0 0 0-37.5 15.537 53 53 0 0 0 17.426 86.422 53.407 53.407 0 0 0 58.05-11.582 52.824 52.824 0 0 0 11.388-57.838 53.23 53.23 0 0 0-49.364-32.539z" ></path></symbol><symbol id="authing-wechatwork-corp-qrconnect" viewBox="0 0 1220 1024"><path d="M1077.17 663.237c-29.54-34.659-51.2-77.982-61.047-127.803-3.938-34.659-31.508-62.819-64.985-62.819-35.446 0-64.984 32.493-64.984 71.483 0 34.659 21.661 64.985 53.17 71.484 45.291 8.664 88.614 34.658 120.122 69.316 1.97 2.167 5.908 4.333 9.846 4.333 7.877 0 13.785-6.499 13.785-15.163-1.97-4.333-1.97-8.665-5.908-10.831z m-194.955-26.782c1.97-2.166 3.939-6.498 3.939-10.83 0-8.665-5.908-15.163-13.785-15.163-3.938 2.166-7.877 4.332-9.846 6.498-31.508 32.492-70.892 56.32-116.185 67.15-31.507 4.333-57.107 34.66-57.107 71.484 0 38.99 29.538 71.483 64.984 71.483 31.508 0 59.077-23.828 64.985-58.486 7.877-49.822 31.508-97.477 63.015-132.136z m165.416 243.2c31.507-32.492 70.892-56.32 116.184-67.15 31.508-4.333 57.108-34.659 57.108-71.483 0-38.991-29.538-71.484-64.985-71.484-31.507 0-59.076 23.828-64.984 58.487-7.877 49.821-31.508 97.477-63.016 132.135-1.969 2.166-3.938 6.498-3.938 10.83 0 8.665 5.908 15.164 13.785 15.164 3.938-2.166 7.877-4.332 9.846-6.499z m-76.8 1.379c-45.293-8.665-88.616-34.659-120.123-69.317a14.375 14.375 0 0 0-9.846-4.332c-7.877 0-13.785 6.498-13.785 15.163 1.97 4.332 3.938 8.664 5.908 10.83 29.538 34.659 51.2 77.982 61.046 127.804 3.938 34.658 31.507 62.818 64.984 62.818 35.447 0 64.985-32.492 64.985-71.483 0-34.659-21.662-64.985-53.17-71.483z" ></path><path d="M243.554 810.2s2.048 0 4.096-2.067l101.534-50.708c8.172-4.135 16.345-4.135 24.497-2.067 44.899 12.445 76.544 11.106 123.49 11.106 48.995 0 95.174-4.155 130.502-16.325l31.665 111.065c-51.043 14.533-106.142 22.843-159.232 22.843a571.077 571.077 0 0 1-146.964-18.688l-108.19 53.957c-10.2 4.135-24.497 6.222-36.745 6.222-12.249 0-24.497-4.135-34.698-10.377-20.421-14.514-30.622-39.424-28.574-70.558v-2.068l10.201-85.07C55.099 676.51 0 560.285 0 439.926 0 197.12 224.551 0 502.154 0c277.622 0 502.154 197.14 502.154 442.014h-123.55c0-205.43-174.001-327.208-370.196-328.744-238.808-1.85-385.378 153.6-393.216 316.948-4.982 103.62 33.36 186.466 125.224 257.024 10.2 8.31 8.468 35.19 6.44 47.655" ></path></symbol><symbol id="authing-wechatwork-service-provider-qrconnect" viewBox="0 0 1220 1024"><path d="M1077.17 663.237c-29.54-34.659-51.2-77.982-61.047-127.803-3.938-34.659-31.508-62.819-64.985-62.819-35.446 0-64.984 32.493-64.984 71.483 0 34.659 21.661 64.985 53.17 71.484 45.291 8.664 88.614 34.658 120.122 69.316 1.97 2.167 5.908 4.333 9.846 4.333 7.877 0 13.785-6.499 13.785-15.163-1.97-4.333-1.97-8.665-5.908-10.831z m-194.955-26.782c1.97-2.166 3.939-6.498 3.939-10.83 0-8.665-5.908-15.163-13.785-15.163-3.938 2.166-7.877 4.332-9.846 6.498-31.508 32.492-70.892 56.32-116.185 67.15-31.507 4.333-57.107 34.66-57.107 71.484 0 38.99 29.538 71.483 64.984 71.483 31.508 0 59.077-23.828 64.985-58.486 7.877-49.822 31.508-97.477 63.015-132.136z m165.416 243.2c31.507-32.492 70.892-56.32 116.184-67.15 31.508-4.333 57.108-34.659 57.108-71.483 0-38.991-29.538-71.484-64.985-71.484-31.507 0-59.076 23.828-64.984 58.487-7.877 49.821-31.508 97.477-63.016 132.135-1.969 2.166-3.938 6.498-3.938 10.83 0 8.665 5.908 15.164 13.785 15.164 3.938-2.166 7.877-4.332 9.846-6.499z m-76.8 1.379c-45.293-8.665-88.616-34.659-120.123-69.317a14.375 14.375 0 0 0-9.846-4.332c-7.877 0-13.785 6.498-13.785 15.163 1.97 4.332 3.938 8.664 5.908 10.83 29.538 34.659 51.2 77.982 61.046 127.804 3.938 34.658 31.507 62.818 64.984 62.818 35.447 0 64.985-32.492 64.985-71.483 0-34.659-21.662-64.985-53.17-71.483z" ></path><path d="M243.554 810.2s2.048 0 4.096-2.067l101.534-50.708c8.172-4.135 16.345-4.135 24.497-2.067 44.899 12.445 76.544 11.106 123.49 11.106 48.995 0 95.174-4.155 130.502-16.325l31.665 111.065c-51.043 14.533-106.142 22.843-159.232 22.843a571.077 571.077 0 0 1-146.964-18.688l-108.19 53.957c-10.2 4.135-24.497 6.222-36.745 6.222-12.249 0-24.497-4.135-34.698-10.377-20.421-14.514-30.622-39.424-28.574-70.558v-2.068l10.201-85.07C55.099 676.51 0 560.285 0 439.926 0 197.12 224.551 0 502.154 0c277.622 0 502.154 197.14 502.154 442.014h-123.55c0-205.43-174.001-327.208-370.196-328.744-238.808-1.85-385.378 153.6-393.216 316.948-4.982 103.62 33.36 186.466 125.224 257.024 10.2 8.31 8.468 35.19 6.44 47.655" ></path></symbol><symbol id="authing-weibo" viewBox="0 0 1185 1024"><path d="M891.75 466.973c-17.137-5.012-29.37-7.545-19.616-30.019 19.616-47.477 19.616-90 0-120.017-39.18-57.503-144.538-54.97-264.61-2.48 0 0-39.125 17.517-29.37-12.502 19.615-59.982 17.19-109.992-12.234-140.01-66.127-67.473-240.089 2.532-389.532 154.992C63.7 431.942 0 551.96 0 656.996c0 199.94 252.322 322.49 497.314 322.49 323.354 0 536.55-192.503 538.975-347.496 0-92.533-75.934-142.545-144.539-165.017zM499.794 907C303.79 926.941 134.73 836.94 122.497 704.474c-14.714-129.987 134.73-252.484 330.735-272.532 196.005-19.939 365.01 70.06 377.243 202.527 14.712 129.987-134.73 252.484-330.68 272.532z m19.563-375.034c-93.072-25.005-198.43 22.527-240.088 107.515-41.605 87.52 0 182.478 93.125 212.496 97.975 32.497 213.142-17.515 252.322-109.995 39.179-92.53-9.81-185.01-105.359-210.016z m-70.976 219.987c-19.616 30.018-61.22 45-90.645 30.018-29.372-14.982-39.18-50.012-19.617-82.455 19.616-30.07 58.796-42.574 88.22-30.07 29.372 15.034 39.18 50.01 22.042 82.507z m63.7-82.455c-7.329 12.45-22.095 17.461-34.275 12.45-12.287-4.958-17.192-17.462-9.809-29.964 4.85-12.503 19.564-17.515 31.797-12.503 12.288 5.011 17.191 17.515 12.288 29.964z m431.137-327.555a83.964 83.964 0 0 0-14.66-74.963c-19.616-19.994-46.562-30.019-71.029-22.527-22.096 5.012-41.658-9.97-46.563-30.018a40.258 40.258 0 0 1 29.426-47.479c51.412-10.023 107.783 5.012 144.537 47.479a157.904 157.904 0 0 1 31.797 152.514c-7.33 19.994-29.372 32.497-48.988 25.006-19.563-5.012-31.796-27.485-24.466-50.012z m227.908 75.018a44.838 44.838 0 0 1-56.37 30.019c-24.521-7.546-36.755-35.032-29.426-57.504a226.13 226.13 0 0 0-46.508-222.52c-56.372-62.515-137.21-87.52-213.144-70.006a45.108 45.108 0 0 1-53.892-35.029c-4.904-24.952 9.754-49.958 34.276-54.97a312.789 312.789 0 0 1 298.884 97.544c78.413 87.467 98.03 207.485 66.18 312.466z" ></path></symbol><symbol id="authing-github" viewBox="0 0 1024 1024"><path d="M51.57 672.155c3.72-6.605 52.236-29.956 126.057 57.307 0.186 0 0.465 0.14 0.79 0.419 5.21 4.326 29.538 39.26 43.307 51.865 58.935 53.307 147.083 12.001 157.13 6.047 4.652-38.282 19.025-68.378 43.027-90.52a290.072 290.072 0 0 1-64.052-10.047 203.832 203.832 0 0 1-61.029-18.048 168.852 168.852 0 0 1-58.052-29.165c-17.35-9.35-33.677-23.444-49.027-42.237a205.367 205.367 0 0 1-40.004-58.284c-10.698-20.095-19.071-45.911-25.072-77.356-6-28.84-8.977-62.005-8.977-99.543 0-68.983 22.979-129.64 69.076-181.924-2.745-5.395-33.026-77.17 7.907-179.969 55.447-1.954 115.173 23.49 185.226 68.332A925.198 925.198 0 0 1 547.008 46.89c56.936 1.907 113.592 9.303 169.132 22.142C739.49 54.984 821.637-1.3 900.249 2.747c37.678 89.45 11.024 170.154 6.977 178.9 46.05 46.236 69.076 104.846 69.076 175.875v6.047c0.326 5.024 0.512 10.094 0.512 15.118 0 27.77-3.163 55.958-9.536 84.473a349.24 349.24 0 0 1-25.025 77.402 282.816 282.816 0 0 1-39.027 57.26 367.242 367.242 0 0 1-49.028 41.26c-18.42 10.56-37.445 20.002-57.074 28.142a1890.865 1890.865 0 0 1-61.076 18.048 1650.986 1650.986 0 0 0-64.052 10.048c30.05 25.49 45.4 66.982 46.05 124.662a3242.148 3242.148 0 0 0-0.464 55.54c0 19.583 0.186 40.282 0.465 62.052-0.651 21.444-0.93 37.724-0.93 48.795 0 11.07 0.279 16.931 0.93 17.536a677.27 677.27 0 0 1-159.084 20.048h-14.978c-54.424 0-107.452-6.651-159.177-20.14-0.698-0.652-0.977-39.214-0.977-115.546-20.7 4.652-157.037 31.538-217.508-69.913-19.304-30.05-35.351-103.405-100.753-136.152-6.93 18.048-28.84 2.652-14-10.047z" ></path></symbol></svg>'
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { message } from 'antd'
|
|
2
|
-
import { User } from 'authing-js-sdk'
|
|
3
|
-
import { FormInstance } from 'antd/lib/form'
|
|
4
|
-
import React, { useCallback, useMemo, useRef } from 'react'
|
|
5
|
-
|
|
6
|
-
import { useGuardContext } from '../../../context/global/context'
|
|
7
|
-
import {
|
|
8
|
-
ADLoginForm,
|
|
9
|
-
LdapLoginForm,
|
|
10
|
-
QrCodeLoginForm,
|
|
11
|
-
SocialAndIdpLogin,
|
|
12
|
-
PasswordLoginForm,
|
|
13
|
-
PhoneCodeLoginForm,
|
|
14
|
-
} from '../../../components/AuthingGuard/Forms'
|
|
15
|
-
import {
|
|
16
|
-
OTP_MFA_CODE,
|
|
17
|
-
APP_MFA_CODE,
|
|
18
|
-
LOGIN_METHODS_MAP,
|
|
19
|
-
} from '../../../components/AuthingGuard/constants'
|
|
20
|
-
import { AuthingTabs } from '../../../common/AuthingTabs'
|
|
21
|
-
import {
|
|
22
|
-
BaseFormProps,
|
|
23
|
-
GuardScenes,
|
|
24
|
-
LoginMethods,
|
|
25
|
-
} from '../../../components/AuthingGuard/types'
|
|
26
|
-
|
|
27
|
-
import './style.less'
|
|
28
|
-
import { useTranslation } from 'react-i18next'
|
|
29
|
-
|
|
30
|
-
const useFormActions = () => {
|
|
31
|
-
const { t } = useTranslation()
|
|
32
|
-
|
|
33
|
-
const {
|
|
34
|
-
setValue,
|
|
35
|
-
state: { guardEvents, authClient },
|
|
36
|
-
} = useGuardContext()
|
|
37
|
-
|
|
38
|
-
const onSuccess = useCallback(
|
|
39
|
-
(user: User) => {
|
|
40
|
-
message.success(t('common.LoginSuccess'))
|
|
41
|
-
guardEvents.onLogin?.(user, authClient)
|
|
42
|
-
},
|
|
43
|
-
[authClient, guardEvents, t]
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
const onFail = useCallback(
|
|
47
|
-
(error: any) => {
|
|
48
|
-
if (OTP_MFA_CODE === error?.code) {
|
|
49
|
-
setValue('mfaData', error.data)
|
|
50
|
-
setValue('guardScenes', GuardScenes.MfaVerify)
|
|
51
|
-
}
|
|
52
|
-
if (APP_MFA_CODE === error?.code) {
|
|
53
|
-
setValue('mfaData', error.data)
|
|
54
|
-
setValue('guardScenes', GuardScenes.AppMfaVerify)
|
|
55
|
-
}
|
|
56
|
-
guardEvents.onLoginError?.(error, authClient)
|
|
57
|
-
},
|
|
58
|
-
[authClient, guardEvents, setValue]
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
return {
|
|
62
|
-
onFail,
|
|
63
|
-
onSuccess,
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const useNormalLoginTabs = ({ onSuccess, onFail }: BaseFormProps) => {
|
|
68
|
-
const formRef = useRef<Record<LoginMethods, FormInstance>>(
|
|
69
|
-
{} as Record<LoginMethods, FormInstance>
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
const formProps = {
|
|
73
|
-
onFail,
|
|
74
|
-
onSuccess,
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const LOGIN_FORM_MAP = {
|
|
78
|
-
[LoginMethods.Password]: (props: any) => (
|
|
79
|
-
<PasswordLoginForm
|
|
80
|
-
{...props}
|
|
81
|
-
ref={(v) => (formRef.current[LoginMethods.Password] = v!)}
|
|
82
|
-
/>
|
|
83
|
-
),
|
|
84
|
-
[LoginMethods.PhoneCode]: (props: any) => (
|
|
85
|
-
<PhoneCodeLoginForm
|
|
86
|
-
{...props}
|
|
87
|
-
ref={(v) => (formRef.current[LoginMethods.PhoneCode] = v!)}
|
|
88
|
-
/>
|
|
89
|
-
),
|
|
90
|
-
[LoginMethods.AppQr]: (props: any) => (
|
|
91
|
-
<QrCodeLoginForm type={LoginMethods.AppQr} {...props} />
|
|
92
|
-
),
|
|
93
|
-
[LoginMethods.WxMinQr]: (props: any) => (
|
|
94
|
-
<QrCodeLoginForm type={LoginMethods.WxMinQr} {...props} />
|
|
95
|
-
),
|
|
96
|
-
[LoginMethods.LDAP]: (props: any) => (
|
|
97
|
-
<LdapLoginForm
|
|
98
|
-
{...props}
|
|
99
|
-
ref={(v) => (formRef.current[LoginMethods.LDAP] = v!)}
|
|
100
|
-
/>
|
|
101
|
-
),
|
|
102
|
-
[LoginMethods.WechatMpQrcode]: (props: any) => (
|
|
103
|
-
<QrCodeLoginForm type={LoginMethods.WechatMpQrcode} {...props} />
|
|
104
|
-
),
|
|
105
|
-
[LoginMethods.AD]: (props: any) => (
|
|
106
|
-
<ADLoginForm
|
|
107
|
-
{...props}
|
|
108
|
-
ref={(v) => (formRef.current[LoginMethods.AD] = v!)}
|
|
109
|
-
/>
|
|
110
|
-
),
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const {
|
|
114
|
-
state: { config },
|
|
115
|
-
} = useGuardContext()
|
|
116
|
-
const {
|
|
117
|
-
loginMethods = [],
|
|
118
|
-
loginMethodTitleMapping,
|
|
119
|
-
qrcodeTabsSettings,
|
|
120
|
-
} = config
|
|
121
|
-
|
|
122
|
-
let tabs: any[] = []
|
|
123
|
-
|
|
124
|
-
// 兼容 密码登陆 donglyc
|
|
125
|
-
let filterLoginMethods = loginMethods.filter(
|
|
126
|
-
(d) => d.indexOf('password') === -1
|
|
127
|
-
)
|
|
128
|
-
const hasPassword = loginMethods.some((d) => d.indexOf('password') !== -1)
|
|
129
|
-
if (hasPassword) filterLoginMethods.push(LoginMethods.Password)
|
|
130
|
-
|
|
131
|
-
filterLoginMethods.forEach((method: LoginMethods) => {
|
|
132
|
-
if (
|
|
133
|
-
[LoginMethods.WechatMpQrcode, LoginMethods.WxMinQr].includes(method) &&
|
|
134
|
-
qrcodeTabsSettings[method]
|
|
135
|
-
) {
|
|
136
|
-
tabs.push(
|
|
137
|
-
...qrcodeTabsSettings[method].map((idp) => {
|
|
138
|
-
return {
|
|
139
|
-
key: idp.id,
|
|
140
|
-
label: idp.title || loginMethodTitleMapping[method],
|
|
141
|
-
component: LOGIN_FORM_MAP[method]({
|
|
142
|
-
...formProps,
|
|
143
|
-
idp,
|
|
144
|
-
}),
|
|
145
|
-
}
|
|
146
|
-
})
|
|
147
|
-
)
|
|
148
|
-
} else {
|
|
149
|
-
tabs.push({
|
|
150
|
-
key: method,
|
|
151
|
-
label: LOGIN_METHODS_MAP()[method],
|
|
152
|
-
component: LOGIN_FORM_MAP[method](formProps),
|
|
153
|
-
})
|
|
154
|
-
}
|
|
155
|
-
})
|
|
156
|
-
return {
|
|
157
|
-
tabs,
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
const SHOW_SOCIAL_LOGIN_TAB = [
|
|
162
|
-
LoginMethods.LDAP,
|
|
163
|
-
LoginMethods.Password,
|
|
164
|
-
LoginMethods.PhoneCode,
|
|
165
|
-
]
|
|
166
|
-
export const LoginLayout = () => {
|
|
167
|
-
const {
|
|
168
|
-
state: { activeTabs, config },
|
|
169
|
-
setValue,
|
|
170
|
-
} = useGuardContext()
|
|
171
|
-
const { qrcodeTabsSettings } = config
|
|
172
|
-
|
|
173
|
-
const { onFail, onSuccess } = useFormActions()
|
|
174
|
-
const { tabs } = useNormalLoginTabs({ onSuccess, onFail })
|
|
175
|
-
|
|
176
|
-
const activeKey = useMemo(() => {
|
|
177
|
-
const activeTab = activeTabs[GuardScenes.Login]
|
|
178
|
-
if (
|
|
179
|
-
[LoginMethods.WechatMpQrcode, LoginMethods.WxMinQr].includes(activeTab) &&
|
|
180
|
-
qrcodeTabsSettings[activeTab]
|
|
181
|
-
) {
|
|
182
|
-
return qrcodeTabsSettings[activeTab].find((item) => item.isDefault)?.id
|
|
183
|
-
}
|
|
184
|
-
return activeTab
|
|
185
|
-
}, [activeTabs, qrcodeTabsSettings])
|
|
186
|
-
|
|
187
|
-
return (
|
|
188
|
-
<>
|
|
189
|
-
<AuthingTabs
|
|
190
|
-
tabs={tabs}
|
|
191
|
-
onTabClick={(t) =>
|
|
192
|
-
setValue('activeTabs', {
|
|
193
|
-
...activeTabs,
|
|
194
|
-
[GuardScenes.Login]: t,
|
|
195
|
-
})
|
|
196
|
-
}
|
|
197
|
-
activeKey={activeKey}
|
|
198
|
-
/>
|
|
199
|
-
|
|
200
|
-
{SHOW_SOCIAL_LOGIN_TAB.includes(activeTabs[GuardScenes.Login]) && (
|
|
201
|
-
<SocialAndIdpLogin onFail={onFail} onSuccess={onSuccess} />
|
|
202
|
-
)}
|
|
203
|
-
</>
|
|
204
|
-
)
|
|
205
|
-
}
|
|
File without changes
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { message } from 'antd'
|
|
2
|
-
import { User } from 'authing-js-sdk'
|
|
3
|
-
import React, { FC, useState } from 'react'
|
|
4
|
-
|
|
5
|
-
import { Steps } from './Steps'
|
|
6
|
-
import {
|
|
7
|
-
MfaResetCodeForm,
|
|
8
|
-
MFAVerifyForm,
|
|
9
|
-
} from '../../../components/AuthingGuard/Forms'
|
|
10
|
-
import { useGuardContext } from '../../../context/global/context'
|
|
11
|
-
|
|
12
|
-
import './style.less'
|
|
13
|
-
import { useTranslation } from 'react-i18next'
|
|
14
|
-
|
|
15
|
-
export interface MfaLayoutProps {}
|
|
16
|
-
|
|
17
|
-
export const MfaLayout: FC<MfaLayoutProps> = () => {
|
|
18
|
-
const { t } = useTranslation()
|
|
19
|
-
const {
|
|
20
|
-
state: { guardEvents, authClient },
|
|
21
|
-
} = useGuardContext()
|
|
22
|
-
|
|
23
|
-
const [step, setStep] = useState(Steps.Verify)
|
|
24
|
-
|
|
25
|
-
const onSuccess = (user: User) => {
|
|
26
|
-
message.success(t('common.LoginSuccess'))
|
|
27
|
-
guardEvents.onLogin?.(user, authClient)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const onFail = (error: any) => {
|
|
31
|
-
guardEvents.onLoginError?.(error, authClient)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const formProps = {
|
|
35
|
-
onSuccess,
|
|
36
|
-
onFail,
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const formMap = {
|
|
40
|
-
[Steps.Verify]: (
|
|
41
|
-
<MFAVerifyForm {...formProps} goReset={() => setStep(Steps.Reset)} />
|
|
42
|
-
),
|
|
43
|
-
[Steps.Reset]: (
|
|
44
|
-
<MfaResetCodeForm {...formProps} goVerify={() => setStep(Steps.Verify)} />
|
|
45
|
-
),
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return <div>{formMap[step]}</div>
|
|
49
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { message } from 'antd'
|
|
2
|
-
import { User } from 'authing-js-sdk'
|
|
3
|
-
import React, { FC } from 'react'
|
|
4
|
-
|
|
5
|
-
import { useGuardContext } from '../../../context/global/context'
|
|
6
|
-
import {
|
|
7
|
-
GuardScenes,
|
|
8
|
-
LoginMethods,
|
|
9
|
-
RegisterMethods,
|
|
10
|
-
} from '../../../components/AuthingGuard/types'
|
|
11
|
-
import { AuthingTabs } from '../../../common/AuthingTabs'
|
|
12
|
-
import { REGISTER_METHODS_MAP } from '../../../components/AuthingGuard/constants'
|
|
13
|
-
import {
|
|
14
|
-
EmailRegisterForm,
|
|
15
|
-
PhoneRegisterForm,
|
|
16
|
-
} from '../../../components/AuthingGuard/Forms'
|
|
17
|
-
import { useTranslation } from 'react-i18next'
|
|
18
|
-
|
|
19
|
-
export const RegisterLayout: FC = () => {
|
|
20
|
-
const {
|
|
21
|
-
state: {
|
|
22
|
-
config: { registerMethods, extendsFields, loginMethods = [] },
|
|
23
|
-
activeTabs,
|
|
24
|
-
guardEvents,
|
|
25
|
-
authClient,
|
|
26
|
-
},
|
|
27
|
-
setValue,
|
|
28
|
-
} = useGuardContext()
|
|
29
|
-
|
|
30
|
-
const { t } = useTranslation()
|
|
31
|
-
const onSuccess = (user: User) => {
|
|
32
|
-
message.success(t('common.registrationSuccess'))
|
|
33
|
-
if (extendsFields?.length > 0) {
|
|
34
|
-
setValue('guardScenes', GuardScenes.CompleteUserInfo)
|
|
35
|
-
} else {
|
|
36
|
-
setValue('guardScenes', GuardScenes.Login)
|
|
37
|
-
}
|
|
38
|
-
guardEvents.onRegister?.(user, authClient)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const onFail = (error: any) => {
|
|
42
|
-
guardEvents.onRegisterError?.(error, authClient)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const formProps = {
|
|
46
|
-
onSuccess,
|
|
47
|
-
onFail,
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const onTabClick = (t: string) => {
|
|
51
|
-
const next = {
|
|
52
|
-
...activeTabs,
|
|
53
|
-
[GuardScenes.Register]: t,
|
|
54
|
-
}
|
|
55
|
-
switch (t) {
|
|
56
|
-
case RegisterMethods.Email:
|
|
57
|
-
loginMethods.includes(LoginMethods.Password) &&
|
|
58
|
-
(next[GuardScenes.Login] = LoginMethods.Password)
|
|
59
|
-
break
|
|
60
|
-
case RegisterMethods.Phone:
|
|
61
|
-
loginMethods.includes(LoginMethods.PhoneCode) &&
|
|
62
|
-
(next[GuardScenes.Login] = LoginMethods.PhoneCode)
|
|
63
|
-
break
|
|
64
|
-
default:
|
|
65
|
-
break
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
setValue('activeTabs', next)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const REGISTER_FORM_MAP = {
|
|
72
|
-
[RegisterMethods.Email]: <EmailRegisterForm {...formProps} />,
|
|
73
|
-
[RegisterMethods.Phone]: <PhoneRegisterForm {...formProps} />,
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const tabs = registerMethods!.map((item) => ({
|
|
77
|
-
key: item,
|
|
78
|
-
label: REGISTER_METHODS_MAP()[item],
|
|
79
|
-
component: REGISTER_FORM_MAP[item],
|
|
80
|
-
}))
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
<AuthingTabs
|
|
84
|
-
activeKey={activeTabs[GuardScenes.Register]}
|
|
85
|
-
onTabClick={onTabClick}
|
|
86
|
-
tabs={tabs}
|
|
87
|
-
></AuthingTabs>
|
|
88
|
-
)
|
|
89
|
-
}
|
|
File without changes
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { useGuardContext } from '../../../context/global/context'
|
|
4
|
-
import { ResetPasswordForm } from '../../../components/AuthingGuard/Forms'
|
|
5
|
-
|
|
6
|
-
export const ResetPwdLayout = () => {
|
|
7
|
-
const {
|
|
8
|
-
state: { guardEvents, authClient },
|
|
9
|
-
} = useGuardContext()
|
|
10
|
-
|
|
11
|
-
const onFail = (error: any) => {
|
|
12
|
-
guardEvents.onPwdResetError?.(error, authClient)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const onSuccess = () => {
|
|
16
|
-
guardEvents.onPwdReset?.(authClient)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return <ResetPasswordForm onFail={onFail} onSuccess={onSuccess} />
|
|
20
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react'
|
|
2
|
-
import { Dropdown, Menu, Space } from 'antd'
|
|
3
|
-
import { LANG_MAP } from '../types'
|
|
4
|
-
import { useTranslation } from 'react-i18next'
|
|
5
|
-
import { changeLang } from '../locales'
|
|
6
|
-
import { useGuardContext } from '../../../context/global/context'
|
|
7
|
-
import { IconFont } from '../IconFont'
|
|
8
|
-
|
|
9
|
-
export const ToggleLang: FC = () => {
|
|
10
|
-
const {
|
|
11
|
-
state: { authClient },
|
|
12
|
-
} = useGuardContext()
|
|
13
|
-
|
|
14
|
-
const onClick = ({ key }: any) => {
|
|
15
|
-
changeLang(key)
|
|
16
|
-
authClient.setLang(key)
|
|
17
|
-
}
|
|
18
|
-
const { i18n } = useTranslation()
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<Dropdown
|
|
22
|
-
className="authing-toggle-language"
|
|
23
|
-
overlay={
|
|
24
|
-
<Menu onClick={onClick}>
|
|
25
|
-
{LANG_MAP.map((item) => (
|
|
26
|
-
<Menu.Item key={item.value}>{item.label}</Menu.Item>
|
|
27
|
-
))}
|
|
28
|
-
</Menu>
|
|
29
|
-
}
|
|
30
|
-
>
|
|
31
|
-
<Space
|
|
32
|
-
size={1}
|
|
33
|
-
style={{
|
|
34
|
-
alignSelf: 'center',
|
|
35
|
-
color: '#999',
|
|
36
|
-
marginTop: 24,
|
|
37
|
-
cursor: 'pointer',
|
|
38
|
-
fontSize: 14,
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
41
|
-
<IconFont type="authing-yuyan" />
|
|
42
|
-
<span>
|
|
43
|
-
{
|
|
44
|
-
LANG_MAP.find((item) => item.value === (i18n.language || 'zh-CN'))
|
|
45
|
-
?.label
|
|
46
|
-
}
|
|
47
|
-
</span>
|
|
48
|
-
</Space>
|
|
49
|
-
</Dropdown>
|
|
50
|
-
)
|
|
51
|
-
}
|