@authing/react-ui-components 3.0.0-alpha → 3.0.0-rc.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 +781 -110
- package/lib/index.min.css +2 -2
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +2 -0
- package/package.json +34 -12
- package/.eslintignore +0 -6
- package/.eslintrc.js +0 -7
- package/.prettierrc +0 -5
- package/.vscode/settings.json +0 -31
- package/build/favicon.ico +0 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +0 -25
- package/build/robots.txt +0 -3
- package/components/AuthingDropdown/index.tsx +0 -52
- package/components/AuthingDropdown/style.less +0 -43
- package/components/AuthingGuard/AppMFALayout/index.tsx +0 -74
- package/components/AuthingGuard/AppMFALayout/style.less +0 -12
- package/components/AuthingGuard/CompleteUserInfoLayout/index.tsx +0 -29
- package/components/AuthingGuard/CompleteUserInfoLayout/style.less +0 -8
- package/components/AuthingGuard/Forms/ADLoginForm/index.tsx +0 -117
- package/components/AuthingGuard/Forms/Agreements/index.tsx +0 -81
- package/components/AuthingGuard/Forms/Agreements/style.less +0 -44
- package/components/AuthingGuard/Forms/CompleteUserInfoForm/index.tsx +0 -139
- package/components/AuthingGuard/Forms/EmailMfaVerifyForm/CheckEmailForm.tsx +0 -84
- package/components/AuthingGuard/Forms/EmailMfaVerifyForm/VerifyCodeForm.tsx +0 -116
- package/components/AuthingGuard/Forms/EmailMfaVerifyForm/index.tsx +0 -40
- package/components/AuthingGuard/Forms/EmailMfaVerifyForm/style.less +0 -0
- package/components/AuthingGuard/Forms/EmailRegisterForm/index.tsx +0 -181
- package/components/AuthingGuard/Forms/EmailRegisterForm/style.less +0 -0
- package/components/AuthingGuard/Forms/LdapLoginForm/index.tsx +0 -166
- package/components/AuthingGuard/Forms/LdapLoginForm/style.less +0 -0
- package/components/AuthingGuard/Forms/LoginFormFooter/index.tsx +0 -76
- package/components/AuthingGuard/Forms/LoginFormFooter/style.less +0 -6
- package/components/AuthingGuard/Forms/MfaResetCodeForm/Step1.tsx +0 -86
- package/components/AuthingGuard/Forms/MfaResetCodeForm/Step2.tsx +0 -53
- package/components/AuthingGuard/Forms/MfaResetCodeForm/index.tsx +0 -65
- package/components/AuthingGuard/Forms/MfaResetCodeForm/style.less +0 -20
- package/components/AuthingGuard/Forms/MfaVerifyForm/index.tsx +0 -105
- package/components/AuthingGuard/Forms/MfaVerifyForm/style.less +0 -12
- package/components/AuthingGuard/Forms/PasswordLoginForm/index.tsx +0 -261
- package/components/AuthingGuard/Forms/PhoneCodeLoginForm/index.tsx +0 -133
- package/components/AuthingGuard/Forms/PhoneRegisterForm/index.tsx +0 -202
- package/components/AuthingGuard/Forms/QrCodeLoginForm/index.tsx +0 -59
- package/components/AuthingGuard/Forms/QrCodeLoginForm/style.less +0 -14
- package/components/AuthingGuard/Forms/RegisterFormFooter/index.tsx +0 -56
- package/components/AuthingGuard/Forms/RegisterFormFooter/style.less +0 -0
- package/components/AuthingGuard/Forms/ResetPwdForm/Footer.tsx +0 -21
- package/components/AuthingGuard/Forms/ResetPwdForm/Step1.tsx +0 -86
- package/components/AuthingGuard/Forms/ResetPwdForm/Step2.tsx +0 -127
- package/components/AuthingGuard/Forms/ResetPwdForm/Step3.tsx +0 -141
- package/components/AuthingGuard/Forms/ResetPwdForm/Step4.tsx +0 -51
- package/components/AuthingGuard/Forms/ResetPwdForm/index.tsx +0 -96
- package/components/AuthingGuard/Forms/ResetPwdForm/style.less +0 -3
- package/components/AuthingGuard/Forms/SendPhoneCode/SendCodeBtn.tsx +0 -88
- package/components/AuthingGuard/Forms/SendPhoneCode/index.tsx +0 -50
- package/components/AuthingGuard/Forms/SendPhoneCode/style.less +0 -26
- package/components/AuthingGuard/Forms/SmsMfaVerifyForm/CheckPhoneForm.tsx +0 -86
- package/components/AuthingGuard/Forms/SmsMfaVerifyForm/VerifyCodeForm.tsx +0 -113
- package/components/AuthingGuard/Forms/SmsMfaVerifyForm/index.tsx +0 -40
- package/components/AuthingGuard/Forms/SmsMfaVerifyForm/style.less +0 -3
- package/components/AuthingGuard/Forms/SocialAndIdpLogin/index.tsx +0 -325
- package/components/AuthingGuard/Forms/SocialAndIdpLogin/style.less +0 -75
- package/components/AuthingGuard/Forms/UploadImage/index.tsx +0 -70
- package/components/AuthingGuard/Forms/index.ts +0 -13
- package/components/AuthingGuard/GuardLayout/index.tsx +0 -474
- package/components/AuthingGuard/GuardLayout/style.less +0 -111
- package/components/AuthingGuard/Header/index.tsx +0 -25
- package/components/AuthingGuard/Header/style.less +0 -52
- package/components/AuthingGuard/IconFont/iconfont.js +0 -74
- package/components/AuthingGuard/IconFont/index.tsx +0 -19
- package/components/AuthingGuard/IconFont/style.less +0 -6
- package/components/AuthingGuard/IconFont/svg.js +0 -2
- package/components/AuthingGuard/LoginLayout/index.tsx +0 -161
- package/components/AuthingGuard/LoginLayout/style.less +0 -0
- package/components/AuthingGuard/MfaLayout/Steps.ts +0 -4
- package/components/AuthingGuard/MfaLayout/index.tsx +0 -49
- package/components/AuthingGuard/MfaLayout/style.less +0 -3
- package/components/AuthingGuard/RegisterLayout/index.tsx +0 -89
- package/components/AuthingGuard/RegisterLayout/style.less +0 -0
- package/components/AuthingGuard/ResetPwdLayout/index.tsx +0 -20
- package/components/AuthingGuard/ToggleLang/index.tsx +0 -51
- package/components/AuthingGuard/api/appConfig.ts +0 -146
- package/components/AuthingGuard/api/index.ts +0 -3
- package/components/AuthingGuard/api/sso.ts +0 -29
- package/components/AuthingGuard/api/userPoolConfig.ts +0 -111
- package/components/AuthingGuard/constants.ts +0 -105
- package/components/AuthingGuard/hooks/index.tsx +0 -70
- package/components/AuthingGuard/hooks/useScreenSize.tsx +0 -68
- package/components/AuthingGuard/index.tsx +0 -126
- package/components/AuthingGuard/style.less +0 -103
- package/components/AuthingGuard/types/Forms.ts +0 -94
- package/components/AuthingGuard/types/GuardConfig.ts +0 -420
- package/components/AuthingGuard/types/GuardState.ts +0 -7
- package/components/AuthingGuard/types/Locales.ts +0 -12
- package/components/AuthingGuard/types/index.ts +0 -4
- package/components/AuthingTabs/index.tsx +0 -98
- package/components/AuthingTabs/style.less +0 -135
- package/components/BindTotp/core/bindSuccess.tsx +0 -61
- package/components/BindTotp/core/securityCode.tsx +0 -119
- package/components/BindTotp/index.tsx +0 -134
- package/components/BindTotp/props.ts +0 -30
- package/components/BindTotp/styles.less +0 -56
- package/components/ChangeLanguage/index.tsx +0 -35
- package/components/ChangePassword/core/firstLoginReset.tsx +0 -104
- package/components/ChangePassword/core/rotateReset.tsx +0 -114
- package/components/ChangePassword/index.tsx +0 -59
- package/components/CompleteInfo/core/completeInfo.tsx +0 -155
- package/components/CompleteInfo/index.tsx +0 -45
- package/components/CompleteInfo/props.ts +0 -40
- package/components/CompleteInfo/styles.less +0 -7
- package/components/CompleteUserInfo/index.tsx +0 -49
- package/components/CompleteUserInfo/props.ts +0 -25
- package/components/ComponentsRender/index.back +0 -64
- package/components/CopyAbleText/index.tsx +0 -54
- package/components/CopyAbleText/style.less +0 -13
- package/components/DownloadAuthenticator/index.tsx +0 -97
- package/components/DownloadAuthenticator/props.ts +0 -22
- package/components/DownloadAuthenticator/styles.less +0 -52
- package/components/ForgetPassword/core/resetPassword.tsx +0 -150
- package/components/ForgetPassword/index.tsx +0 -51
- package/components/Guard/Guard.tsx +0 -226
- package/components/Guard/authClient.ts +0 -55
- package/components/Guard/config.ts +0 -19
- package/components/Guard/event.ts +0 -18
- package/components/Guard/index.tsx +0 -10
- package/components/Guard/module.ts +0 -19
- package/components/Guard/stateMachine.ts +0 -133
- package/components/Guard/styles.less +0 -444
- package/components/IconFont/iconfont.js +0 -74
- package/components/IconFont/index.tsx +0 -16
- package/components/IconFont/style.less +0 -6
- package/components/IconFont/svg.js +0 -2
- package/components/ImagePro/index.tsx +0 -52
- package/components/ImagePro/styles.less +0 -40
- package/components/Login/codemap.ts +0 -35
- package/components/Login/core/withAD.tsx +0 -9
- package/components/Login/core/withAppQrcode.tsx +0 -49
- package/components/Login/core/withLDAP.tsx +0 -145
- package/components/Login/core/withPassword.tsx +0 -176
- package/components/Login/core/withPhonecode.tsx +0 -135
- package/components/Login/core/withWechatMiniQrcode.tsx +0 -60
- package/components/Login/core/withWechatmpQrcode.tsx +0 -53
- package/components/Login/index.tsx +0 -359
- package/components/Login/props.ts +0 -90
- package/components/Login/socialLogin/index.tsx +0 -413
- package/components/Login/socialLogin/style.less +0 -61
- package/components/Login/styles.less +0 -53
- package/components/MFA/codemap.ts +0 -21
- package/components/MFA/core/email.tsx +0 -226
- package/components/MFA/core/face.tsx +0 -297
- package/components/MFA/core/face_deps.tsx +0 -37
- package/components/MFA/core/sms.tsx +0 -222
- package/components/MFA/core/totp.tsx +0 -137
- package/components/MFA/index.tsx +0 -135
- package/components/MFA/mfaMethods/index.tsx +0 -81
- package/components/MFA/mfaMethods/style.less +0 -39
- package/components/MFA/props.ts +0 -51
- package/components/MFA/styles.less +0 -92
- package/components/NeedHelpView/core/describeQuestions.tsx +0 -227
- package/components/NeedHelpView/index.tsx +0 -99
- package/components/RecoveryCode/core/useCode.tsx +0 -71
- package/components/RecoveryCode/index.tsx +0 -27
- package/components/RecoveryCode/interface.ts +0 -31
- package/components/RecoveryCode/style.less +0 -13
- package/components/Register/codemap.ts +0 -16
- package/components/Register/components/Agreements/index.tsx +0 -81
- package/components/Register/components/Agreements/style.less +0 -44
- package/components/Register/core/WithEmail.tsx +0 -250
- package/components/Register/core/WithPhone.tsx +0 -190
- package/components/Register/index.tsx +0 -122
- package/components/Register/props.ts +0 -50
- package/components/SendCode/SendCodeBtn.tsx +0 -96
- package/components/SendCode/index.tsx +0 -98
- package/components/SendCode/style.less +0 -31
- package/components/ShieldSpin/index.tsx +0 -27
- package/components/ShieldSpin/loading.svg +0 -29
- package/components/SubmitButton/index.tsx +0 -50
- package/components/Type/index.ts +0 -61
- package/components/VerifyCodeInput/index.tsx +0 -76
- package/components/VerifyCodeInput/style.less +0 -24
- package/components/_utils/GuardErrorCode.ts +0 -8
- package/components/_utils/clipboard.ts +0 -27
- package/components/_utils/config.ts +0 -123
- package/components/_utils/guradHttp.ts +0 -93
- package/components/_utils/hooks/index.ts +0 -56
- package/components/_utils/http.ts +0 -85
- package/components/_utils/index.ts +0 -310
- package/components/_utils/locales/en/common.json +0 -218
- package/components/_utils/locales/en/index.ts +0 -6
- package/components/_utils/locales/en/login.json +0 -95
- package/components/_utils/locales/en/map.json +0 -4
- package/components/_utils/locales/en/user.json +0 -82
- package/components/_utils/locales/index.ts +0 -45
- package/components/_utils/locales/zh/common.json +0 -218
- package/components/_utils/locales/zh/index.ts +0 -6
- package/components/_utils/locales/zh/login.json +0 -95
- package/components/_utils/locales/zh/map.json +0 -4
- package/components/_utils/locales/zh/user.json +0 -82
- package/components/_utils/popupCenter.ts +0 -48
- package/components/context/base.tsx +0 -28
- package/components/context/global/context.tsx +0 -39
- package/components/context/global/reducer.tsx +0 -56
- package/components/context/module/context.tsx +0 -23
- package/components/index.ts +0 -10
- package/config/antdReplacer.js +0 -51
- package/config/env.js +0 -104
- 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 -835
- package/config/webpackDevServer.config.js +0 -130
- package/examples.tsx +0 -100
- package/index.js +0 -1
- package/logo.svg +0 -7
- 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/react-app-env.d.ts +0 -71
- package/reportWebVitals.ts +0 -15
- package/scripts/build.js +0 -208
- package/scripts/lib.js +0 -200
- package/scripts/start.js +0 -162
- package/scripts/test.js +0 -49
- package/setupTests.ts +0 -5
- package/tsconfig.json +0 -30
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { ConfigProvider, message } from 'antd'
|
|
2
|
-
import React, { FC } from 'react'
|
|
3
|
-
import { AuthenticationClient } from 'authing-js-sdk'
|
|
4
|
-
|
|
5
|
-
import { GuardContext } from '../context/global/context'
|
|
6
|
-
import { GuardScenes } from '../../components/AuthingGuard/types'
|
|
7
|
-
import { requestClient } from '../_utils/http'
|
|
8
|
-
import {
|
|
9
|
-
defaultGuardConfig,
|
|
10
|
-
OTP_MFA_CODE,
|
|
11
|
-
APP_MFA_CODE,
|
|
12
|
-
defaultLocalesConfig,
|
|
13
|
-
defaultHeaders,
|
|
14
|
-
} from '../../components/AuthingGuard/constants'
|
|
15
|
-
import { GuardLayout } from '../../components/AuthingGuard/GuardLayout'
|
|
16
|
-
import {
|
|
17
|
-
UserConfig,
|
|
18
|
-
GuardEventsHandler,
|
|
19
|
-
} from '../../components/AuthingGuard/types/GuardConfig'
|
|
20
|
-
|
|
21
|
-
import './style.less'
|
|
22
|
-
import { initI18n } from '../_utils/locales'
|
|
23
|
-
const PREFIX_CLS = 'authing-ant'
|
|
24
|
-
|
|
25
|
-
message.config({
|
|
26
|
-
prefixCls: `${PREFIX_CLS}-message`,
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
interface AuthingGuardProps extends GuardEventsHandler {
|
|
30
|
-
appId: string
|
|
31
|
-
config?: UserConfig
|
|
32
|
-
visible?: boolean
|
|
33
|
-
className?: string
|
|
34
|
-
id?: string
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const AuthingGuard: FC<AuthingGuardProps> = ({
|
|
38
|
-
appId,
|
|
39
|
-
config = {},
|
|
40
|
-
visible,
|
|
41
|
-
className,
|
|
42
|
-
id,
|
|
43
|
-
...guardEvents
|
|
44
|
-
}) => {
|
|
45
|
-
const {
|
|
46
|
-
apiHost,
|
|
47
|
-
appDomain,
|
|
48
|
-
appHost,
|
|
49
|
-
defaultLoginMethod = defaultGuardConfig.defaultLoginMethod,
|
|
50
|
-
defaultScenes = defaultGuardConfig.defaultScenes,
|
|
51
|
-
defaultRegisterMethod = defaultGuardConfig.defaultRegisterMethod,
|
|
52
|
-
lang,
|
|
53
|
-
localesConfig = defaultLocalesConfig,
|
|
54
|
-
headers = defaultHeaders,
|
|
55
|
-
} = config
|
|
56
|
-
|
|
57
|
-
initI18n(localesConfig, lang)
|
|
58
|
-
|
|
59
|
-
let realHost: string | undefined
|
|
60
|
-
if (appHost) {
|
|
61
|
-
realHost = appHost
|
|
62
|
-
} else if (appDomain) {
|
|
63
|
-
const parsedUrl = new URL(defaultGuardConfig.appHost!)
|
|
64
|
-
realHost = `${parsedUrl.protocol}//${appDomain}${
|
|
65
|
-
parsedUrl.port ? ':' + parsedUrl.port : ''
|
|
66
|
-
}`
|
|
67
|
-
} else {
|
|
68
|
-
realHost = apiHost || defaultGuardConfig.appHost!
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
requestClient.setBaseUrl(realHost)
|
|
72
|
-
requestClient.setLangHeader(headers?.lang)
|
|
73
|
-
|
|
74
|
-
const authClient = new AuthenticationClient({
|
|
75
|
-
appHost: realHost!,
|
|
76
|
-
appId,
|
|
77
|
-
requestFrom: 'ui-components',
|
|
78
|
-
lang: localesConfig.defaultLang ?? lang,
|
|
79
|
-
headers,
|
|
80
|
-
onError: (code, msg: any) => {
|
|
81
|
-
if (code === 2020) {
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
if ([OTP_MFA_CODE, APP_MFA_CODE].includes(code)) {
|
|
85
|
-
message.info(msg)
|
|
86
|
-
return
|
|
87
|
-
}
|
|
88
|
-
message.error(msg)
|
|
89
|
-
},
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
const activeTabs = {
|
|
93
|
-
[GuardScenes.Login]: defaultLoginMethod,
|
|
94
|
-
[GuardScenes.Register]: defaultRegisterMethod,
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return (
|
|
98
|
-
<ConfigProvider prefixCls={PREFIX_CLS}>
|
|
99
|
-
<GuardContext
|
|
100
|
-
value={{
|
|
101
|
-
authClient,
|
|
102
|
-
config: { ...config },
|
|
103
|
-
userConfig: config,
|
|
104
|
-
appId,
|
|
105
|
-
guardScenes: defaultScenes,
|
|
106
|
-
activeTabs,
|
|
107
|
-
guardTitle: config.title,
|
|
108
|
-
mfaData: {
|
|
109
|
-
mfaToken: '',
|
|
110
|
-
},
|
|
111
|
-
guardEvents,
|
|
112
|
-
localesConfig: config.localesConfig,
|
|
113
|
-
realHost: realHost,
|
|
114
|
-
}}
|
|
115
|
-
>
|
|
116
|
-
<GuardLayout
|
|
117
|
-
id={id}
|
|
118
|
-
className={className}
|
|
119
|
-
visible={visible}
|
|
120
|
-
lang={lang}
|
|
121
|
-
userConfig={config}
|
|
122
|
-
/>
|
|
123
|
-
</GuardContext>
|
|
124
|
-
</ConfigProvider>
|
|
125
|
-
)
|
|
126
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
@import '~antd/lib/style/mixins/index.less';
|
|
2
|
-
|
|
3
|
-
*[class*='authing-'] {
|
|
4
|
-
@import '~antd/lib/style/core/global.less';
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.authing-guard-text-btn {
|
|
8
|
-
color: #396aff;
|
|
9
|
-
padding: 0;
|
|
10
|
-
|
|
11
|
-
&:hover,
|
|
12
|
-
&:focus {
|
|
13
|
-
color: #6b90ff;
|
|
14
|
-
background-color: transparent;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.authing-text-center {
|
|
19
|
-
text-align: center;
|
|
20
|
-
.authing-code-input {
|
|
21
|
-
justify-content: center;
|
|
22
|
-
}
|
|
23
|
-
.authing-dropdown-menu-container {
|
|
24
|
-
text-align: left;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.authing-guard-form-actions {
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: space-between;
|
|
31
|
-
margin-top: 8px;
|
|
32
|
-
align-items: center;
|
|
33
|
-
.authing-ant-divider-vertical {
|
|
34
|
-
visibility: hidden;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.authing-guard-tip {
|
|
39
|
-
color: #999;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.authing-guard-tip-btn-comb {
|
|
43
|
-
margin-left: auto;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.authing-guard-full-width-space {
|
|
47
|
-
width: 100%;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.authing-data-tips {
|
|
51
|
-
position: relative;
|
|
52
|
-
&::after {
|
|
53
|
-
content: attr(data-tips);
|
|
54
|
-
position: absolute;
|
|
55
|
-
white-space: nowrap;
|
|
56
|
-
top: 100%;
|
|
57
|
-
left: 50%;
|
|
58
|
-
transform: translateX(-50%) translateY(6px);
|
|
59
|
-
display: none;
|
|
60
|
-
background-color: rgba(0, 0, 0, 0.75);
|
|
61
|
-
font-size: 12px;
|
|
62
|
-
padding: 12px;
|
|
63
|
-
z-index: 500;
|
|
64
|
-
border-radius: 4px;
|
|
65
|
-
color: #fff;
|
|
66
|
-
}
|
|
67
|
-
&:hover {
|
|
68
|
-
&::after {
|
|
69
|
-
display: block;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
.authing-data-tips__top {
|
|
74
|
-
position: relative;
|
|
75
|
-
&::after {
|
|
76
|
-
top: auto;
|
|
77
|
-
bottom: 100%;
|
|
78
|
-
transform: translateX(-50%) translateY(-6px);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.authing-guard-pointer {
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@media only screen and (max-width: 719px) {
|
|
87
|
-
.authing-guard-form-actions {
|
|
88
|
-
.authing-ant-divider-vertical {
|
|
89
|
-
visibility: initial;
|
|
90
|
-
}
|
|
91
|
-
justify-content: flex-end !important;
|
|
92
|
-
.authing-guard-text-btn {
|
|
93
|
-
color: #999999;
|
|
94
|
-
font-size: 12px;
|
|
95
|
-
}
|
|
96
|
-
.authing-guard-tip-btn-comb {
|
|
97
|
-
margin-left: initial !important;
|
|
98
|
-
font-size: 12px;
|
|
99
|
-
font-weight: 400;
|
|
100
|
-
color: #999999;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { User } from 'authing-js-sdk'
|
|
2
|
-
import { LoginMethods } from './GuardConfig'
|
|
3
|
-
import { ResetPwdMethods } from './GuardConfig'
|
|
4
|
-
|
|
5
|
-
export interface BaseFormProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
onSuccess?: (user: User) => void
|
|
7
|
-
onFail?: (error: any) => void
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface CompleteUserInfoFormProps extends BaseFormProps {}
|
|
11
|
-
|
|
12
|
-
export interface PasswordLoginFormProps extends BaseFormProps {
|
|
13
|
-
onValidateFail?: (error: any) => void
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface ADLoginFormProps extends BaseFormProps {
|
|
17
|
-
onValidateFail?: (error: any) => void
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface PhoneCodeLoginFormProps extends BaseFormProps {
|
|
21
|
-
onValidateFail?: (error: any) => void
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface LdapLoginFormProps extends BaseFormProps {
|
|
25
|
-
onValidateFail?: (error: any) => void
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface QrLoginFormProps extends BaseFormProps {
|
|
29
|
-
type: LoginMethods.AppQr | LoginMethods.WxMinQr | LoginMethods.WechatMpQrcode
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface EmailRegisterFormProps extends BaseFormProps {
|
|
33
|
-
onValidateFail?: (error: any) => void
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface PhoneRegisterFormProps extends BaseFormProps {
|
|
37
|
-
onValidateFail?: (error: any) => void
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface ResetPasswordFormProps {
|
|
41
|
-
onSuccess?: () => void
|
|
42
|
-
onFail?: (error: any) => void
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface ResetPasswordStep1Props {
|
|
46
|
-
onSuccess: (resetMethod: ResetPwdMethods, val: string) => void
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface ResetPasswordStep2Props {
|
|
50
|
-
phone: string
|
|
51
|
-
onSuccess: () => void
|
|
52
|
-
onFail?: (error: any) => void
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface ResetPasswordStep3Props {
|
|
56
|
-
email: string
|
|
57
|
-
onSuccess: () => void
|
|
58
|
-
onFail?: (error: any) => void
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface SocialAndIdpLoginProps extends BaseFormProps {}
|
|
62
|
-
|
|
63
|
-
export interface MfaVerifyForm extends BaseFormProps {
|
|
64
|
-
goReset: () => void
|
|
65
|
-
}
|
|
66
|
-
export interface SmsMFAVerifyFormProps extends BaseFormProps {
|
|
67
|
-
phone?: string
|
|
68
|
-
mfaToken: string
|
|
69
|
-
sendCodeRef: React.RefObject<HTMLButtonElement>
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface SmsMFAFormProps extends BaseFormProps {}
|
|
73
|
-
|
|
74
|
-
export interface MFACheckPhoneFormProps {
|
|
75
|
-
mfaToken: string
|
|
76
|
-
onSuccess: (phone: string) => void
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface EmailMFAVerifyFormProps extends BaseFormProps {
|
|
80
|
-
email?: string
|
|
81
|
-
mfaToken: string
|
|
82
|
-
sendCodeRef: React.RefObject<HTMLButtonElement>
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface EmailMFAFormProps extends BaseFormProps {}
|
|
86
|
-
|
|
87
|
-
export interface MFACheckEmailFormProps {
|
|
88
|
-
mfaToken: string
|
|
89
|
-
onSuccess: (email: string) => void
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface MfaResetForm extends BaseFormProps {
|
|
93
|
-
goVerify: () => void
|
|
94
|
-
}
|