@authing/react-ui-components 4.3.1 → 4.3.2-3.rc-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.min.css +2 -2
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +6 -0
- package/package.json +4 -4
- package/types/CompleteInfo/interface.d.ts +4 -1
- package/types/CompleteInfo/utils.d.ts +6 -0
- package/types/ForgetPassword/core/resetPassword.d.ts +2 -2
- package/types/ForgetPassword/interface.d.ts +1 -0
- package/types/Guard/config.d.ts +2 -1
- package/types/Guard/core/hooks/useAgreements.d.ts +14 -0
- package/types/Guard/core/hooks/useGuardView.d.ts +7 -0
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +1 -1
- package/types/Guard/event.d.ts +12 -1
- package/types/LazyloadImage/index.d.ts +12 -0
- package/types/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +17 -0
- package/types/Login/core/withAuthingOtpPush/HowBindClient.d.ts +2 -0
- package/types/Login/core/withAuthingOtpPush/HowGetAppLoginUrl.d.ts +2 -0
- package/types/Login/core/withAuthingOtpPush/HowUsePushLogin.d.ts +2 -0
- package/types/Login/core/withAuthingOtpPush/PendingLogin.d.ts +7 -0
- package/types/Login/core/withAuthingOtpPush/PushLoginGuideModal.d.ts +3 -0
- package/types/Login/core/withAuthingOtpPush/PushLoginGuideSelector.d.ts +9 -0
- package/types/Login/core/withAuthingOtpPush/index.d.ts +3 -0
- package/types/Login/core/withAuthingOtpPush/types.d.ts +28 -0
- package/types/Login/core/withWeComQrcode.d.ts +2 -0
- package/types/Login/multipleAccounts/panel.d.ts +1 -0
- package/types/NewSubmitSuccess/interface.d.ts +2 -0
- package/types/SendCode/SendCodeByPhone.d.ts +2 -0
- package/types/TenantPortalSelect/index.d.ts +0 -13
- package/types/TenantPortalSelect/interface.d.ts +33 -0
- package/types/Type/application.d.ts +28 -1
- package/types/Type/index.d.ts +3 -0
- package/types/_utils/config/index.d.ts +2 -0
- package/types/_utils/context.d.ts +7 -0
- package/types/_utils/guardHttp.d.ts +1 -0
- package/types/_utils/index.d.ts +5 -4
- package/types/index.d.ts +1 -0
- package/types/version/version.d.ts +1 -1
- package/LICENSE +0 -21
- package/dist/asset-manifest.json +0 -26
- package/dist/index.html +0 -1
- package/dist/static/css/2.31681d53.chunk.css +0 -3
- package/dist/static/css/2.31681d53.chunk.css.map +0 -1
- package/dist/static/css/main.5aec6972.chunk.css +0 -2
- package/dist/static/css/main.5aec6972.chunk.css.map +0 -1
- package/dist/static/js/2.d2a1168e.chunk.js +0 -3
- package/dist/static/js/2.d2a1168e.chunk.js.LICENSE.txt +0 -86
- package/dist/static/js/2.d2a1168e.chunk.js.map +0 -1
- package/dist/static/js/3.b3dd7130.chunk.js +0 -2
- package/dist/static/js/3.b3dd7130.chunk.js.map +0 -1
- package/dist/static/js/main.b635a15a.chunk.js +0 -2
- package/dist/static/js/main.b635a15a.chunk.js.map +0 -1
- package/dist/static/js/runtime-main.6f6a6483.js +0 -2
- package/dist/static/js/runtime-main.6f6a6483.js.map +0 -1
- package/dist/static/media/loading.3cf0104f.svg +0 -32
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @license qrcode.react
|
|
30
|
+
* Copyright (c) Paul O'Shannessy
|
|
31
|
+
* SPDX-License-Identifier: ISC
|
|
32
|
+
*/
|
|
33
|
+
|
|
28
34
|
/** @license React v16.13.1
|
|
29
35
|
* react-is.production.min.js
|
|
30
36
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/react-ui-components",
|
|
3
|
-
"version": "4.3.1",
|
|
3
|
+
"version": "4.3.23.rc-1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/index.min.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -11,12 +11,13 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"antd": "^4.8.0",
|
|
14
|
-
"authing-js-sdk": "4.23.
|
|
14
|
+
"authing-js-sdk": "4.23.48",
|
|
15
15
|
"classnames": "^2.3.1",
|
|
16
16
|
"fastclick": "^1.0.6",
|
|
17
17
|
"global": "^4.4.0",
|
|
18
18
|
"phone": "^3.1.12",
|
|
19
19
|
"prompt": "^1.3.0",
|
|
20
|
+
"qrcode.react": "^3.1.0",
|
|
20
21
|
"qs": "^6.9.4",
|
|
21
22
|
"react-responsive": "^9.0.0-beta.5",
|
|
22
23
|
"react-use": "^17.3.1",
|
|
@@ -235,6 +236,5 @@
|
|
|
235
236
|
"webpack-dev-server": "3.11.0",
|
|
236
237
|
"webpack-manifest-plugin": "2.2.0",
|
|
237
238
|
"workbox-webpack-plugin": "5.1.4"
|
|
238
|
-
}
|
|
239
|
-
"gitHead": "d464051d33c7350b716615a3836bfd9998eb8a13"
|
|
239
|
+
}
|
|
240
240
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
|
|
2
|
-
import { IG2Config, IG2Events, IG2FCProps } from '../Type';
|
|
2
|
+
import { IG2Config, IG2Events, IG2FCProps, Lang } from '../Type';
|
|
3
3
|
export interface CompleteInfoConfig extends IG2Config {
|
|
4
4
|
}
|
|
5
5
|
export declare const getDefaultCompleteInfoConfig: () => CompleteInfoConfig;
|
|
@@ -41,6 +41,9 @@ export interface CompleteInfoRule {
|
|
|
41
41
|
type: FormValidateRule;
|
|
42
42
|
content: string;
|
|
43
43
|
errorMessage?: string;
|
|
44
|
+
i18n?: {
|
|
45
|
+
errorMessage: Record<Lang, []>;
|
|
46
|
+
};
|
|
44
47
|
}
|
|
45
48
|
export interface CompleteInfoSelectOption {
|
|
46
49
|
value: string;
|
|
@@ -20,3 +20,9 @@ export declare const fieldValuesToRegisterProfile: (extendsFields: ApplicationCo
|
|
|
20
20
|
value: string;
|
|
21
21
|
}[];
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* @description 获取对应key的国际化value
|
|
25
|
+
* @param record :example {key:"",i18n:{key:{zh_CN:{enabled:true,value:""}}}
|
|
26
|
+
* @param key
|
|
27
|
+
*/
|
|
28
|
+
export declare const getI18nValue: (record: any, key: string) => any;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export declare enum InputMethodMap {
|
|
3
3
|
email = "email-code",
|
|
4
4
|
phone = "phone-code"
|
|
5
5
|
}
|
|
6
6
|
interface ResetPasswordProps {
|
|
7
7
|
publicConfig: any;
|
|
8
|
-
setPhoneOrEmail: any;
|
|
9
8
|
setControlShow: any;
|
|
10
9
|
setPolicyStrength: any;
|
|
11
10
|
setCustomPasswordStrength: any;
|
|
12
11
|
setPhoneOrEmailText: any;
|
|
12
|
+
setResetToken: React.Dispatch<React.SetStateAction<string>>;
|
|
13
13
|
}
|
|
14
14
|
export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -9,6 +9,7 @@ export interface ForgetPasswordEvents extends IG2Events {
|
|
|
9
9
|
onPwdResetError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
|
|
10
10
|
}
|
|
11
11
|
export interface ForgetPasswordConfig extends IG2Config {
|
|
12
|
+
goBack?: null | (() => void);
|
|
12
13
|
}
|
|
13
14
|
export interface ForgetPasswordProps extends IG2FCProps, ForgetPasswordEvents {
|
|
14
15
|
config: Partial<IG2Config>;
|
package/types/Guard/config.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { GuardModuleType } from '.';
|
|
3
|
+
import { ForgetPasswordConfig } from '../ForgetPassword/interface';
|
|
3
4
|
import { LoginConfig } from '../Login/interface';
|
|
4
5
|
import { RegisterConfig } from '../Register/interface';
|
|
5
|
-
export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
|
|
6
|
+
export interface GuardLocalConfig extends RegisterConfig, LoginConfig, ForgetPasswordConfig {
|
|
6
7
|
isSSO?: boolean;
|
|
7
8
|
defaultScenes?: GuardModuleType;
|
|
8
9
|
defaultInitData?: any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Agreement } from '../../../Type';
|
|
2
|
+
interface Options {
|
|
3
|
+
agreements: Agreement[];
|
|
4
|
+
checkedAgreements: (string | number)[];
|
|
5
|
+
checkAllAgreements: () => void;
|
|
6
|
+
unCheckAllAgreements: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useAgreements(options: Options): {
|
|
9
|
+
agreements: Agreement[];
|
|
10
|
+
checkedAgreements: (string | number)[];
|
|
11
|
+
checkAllAgreements: () => void;
|
|
12
|
+
unCheckAllAgreements: () => void;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
|
|
|
13
13
|
* 登录时所有支持的登录列表(前端定义列表)
|
|
14
14
|
* 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
|
|
15
15
|
*/
|
|
16
|
-
export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone';
|
|
16
|
+
export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
|
|
17
17
|
/**
|
|
18
18
|
* when: 多账号页面跳转进入登录页面
|
|
19
19
|
* 携带的回填数据信息
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -5,8 +5,16 @@ import { IdentityBindingEvents } from '../IdentityBinding/interface';
|
|
|
5
5
|
import { IdentityBindingAskEvents } from '../IdentityBindingAsk';
|
|
6
6
|
import { LoginEvents } from '../Login/interface';
|
|
7
7
|
import { RegisterEvents } from '../Register/interface';
|
|
8
|
-
|
|
8
|
+
import { TenantPortalEvents } from '../TenantPortalSelect/interface';
|
|
9
|
+
interface OnAfterChangeModuleOptions {
|
|
10
|
+
currentView: string;
|
|
11
|
+
currentModule: GuardModuleType;
|
|
12
|
+
currentTab?: string;
|
|
13
|
+
data?: any;
|
|
14
|
+
}
|
|
15
|
+
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents, TenantPortalEvents {
|
|
9
16
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
17
|
+
onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
|
|
10
18
|
}
|
|
11
19
|
export declare const guardEventsFilter: (props: any, multipleInstance?: {
|
|
12
20
|
initStore: (appId: string, options: {
|
|
@@ -65,6 +73,7 @@ export declare const GuardEventsCamelToKebabMapping: {
|
|
|
65
73
|
readonly onRegisterInfoCompletedError: "register-info-completed-error";
|
|
66
74
|
readonly onLangChange: "lang-change";
|
|
67
75
|
readonly onBeforeChangeModule: "before-change-module";
|
|
76
|
+
readonly onAfterChangeModule: "after-change-module";
|
|
68
77
|
};
|
|
69
78
|
export interface GuardEventsKebabToCamelType {
|
|
70
79
|
load: GuardEvents['onLoad'];
|
|
@@ -88,4 +97,6 @@ export interface GuardEventsKebabToCamelType {
|
|
|
88
97
|
'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
|
|
89
98
|
'lang-change': GuardEvents['onLangChange'];
|
|
90
99
|
'before-change-module': GuardEvents['onBeforeChangeModule'];
|
|
100
|
+
'after-change-module': GuardEvents['onAfterChangeModule'];
|
|
91
101
|
}
|
|
102
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
interface LazyloadImageProps {
|
|
3
|
+
src: string;
|
|
4
|
+
placeholder: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
alt?: string;
|
|
8
|
+
width?: string;
|
|
9
|
+
height?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function LazyloadImage(props: LazyloadImageProps): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OnPushSuccessProps, OnLoginProps } from './types';
|
|
3
|
+
import { AuthingGuardResponse } from '../../../_utils/http';
|
|
4
|
+
import { Agreement } from '../../../Type';
|
|
5
|
+
interface BeforeLoginProps {
|
|
6
|
+
onPushSuccess: (props: OnPushSuccessProps) => void;
|
|
7
|
+
signinByPush: (props: OnLoginProps) => Promise<AuthingGuardResponse<{
|
|
8
|
+
pushCodeId: string;
|
|
9
|
+
}>>;
|
|
10
|
+
pushLoginStatus: boolean;
|
|
11
|
+
onchangePushLoginStatus: () => void;
|
|
12
|
+
defaultAccount: string;
|
|
13
|
+
setAccount: React.Dispatch<any>;
|
|
14
|
+
agreements: Agreement[];
|
|
15
|
+
}
|
|
16
|
+
export declare function BeforeLogin(props: BeforeLoginProps): JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectorOptions, Selector } from './types';
|
|
3
|
+
interface PushLoginGuideSelectorProps {
|
|
4
|
+
defaultValue: Selector;
|
|
5
|
+
onChange: (value: Selector) => void;
|
|
6
|
+
options: SelectorOptions;
|
|
7
|
+
}
|
|
8
|
+
export declare function PushLoginGuideSelector(props: PushLoginGuideSelectorProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BackFillMultipleState, StoreInstance } from '../../../Guard/core/hooks/useMultipleAccounts';
|
|
2
|
+
import { Agreement } from '../../../Type';
|
|
3
|
+
export interface OnPushSuccessProps {
|
|
4
|
+
pushCodeId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CheckPushCodeStatusProps {
|
|
7
|
+
pushCodeId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface OnLoginProps {
|
|
10
|
+
account: string;
|
|
11
|
+
}
|
|
12
|
+
export declare type LoginStatus = 'before' | 'pending';
|
|
13
|
+
export interface LoginWithAuthingOtpPushProps {
|
|
14
|
+
onLoginSuccess?: any;
|
|
15
|
+
multipleInstance?: StoreInstance;
|
|
16
|
+
initData?: BackFillMultipleState;
|
|
17
|
+
agreements: Agreement[];
|
|
18
|
+
}
|
|
19
|
+
export interface PushLoginGudeModalProps {
|
|
20
|
+
visible: boolean;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
|
|
24
|
+
export interface SelectorOption {
|
|
25
|
+
value: Selector;
|
|
26
|
+
label: string;
|
|
27
|
+
}
|
|
28
|
+
export declare type SelectorOptions = SelectorOption[];
|
|
@@ -10,6 +10,8 @@ export interface SubmitSuccessInitData {
|
|
|
10
10
|
text?: string;
|
|
11
11
|
countDesc?: string;
|
|
12
12
|
changeModule?: GuardModuleType;
|
|
13
|
+
needBack?: boolean;
|
|
14
|
+
goBack?: () => void;
|
|
13
15
|
}
|
|
14
16
|
export interface GuardNewSubmitSuccessViewProps extends IG2FCViewProps, SubmitSuccessEvents {
|
|
15
17
|
config: SubmitSuccessConfig;
|
|
@@ -1,16 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './styles.less';
|
|
3
|
-
/** 租户门户选择状态机返回数据类型 */
|
|
4
|
-
export interface TenantPortalSelectType {
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
logo: string;
|
|
8
|
-
list: {
|
|
9
|
-
tenantName: string;
|
|
10
|
-
tenantId: string;
|
|
11
|
-
tenantLogo: string;
|
|
12
|
-
host: string;
|
|
13
|
-
userName: string;
|
|
14
|
-
}[];
|
|
15
|
-
}
|
|
16
3
|
export declare const GuardTenantPortalSelectView: () => JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AvatarProps } from 'antd/lib/avatar';
|
|
3
|
+
import { AuthenticationClient, IG2Events, User } from '../Type';
|
|
4
|
+
export interface TenantPortalListType {
|
|
5
|
+
tenantName: string;
|
|
6
|
+
tenantId: string;
|
|
7
|
+
tenantLogo: string;
|
|
8
|
+
host: string;
|
|
9
|
+
description: string;
|
|
10
|
+
/** 是否为用户池 */
|
|
11
|
+
isUserPool: boolean;
|
|
12
|
+
userName?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TenantPortalSelectType extends Omit<TenantPortalListType, 'userName'> {
|
|
15
|
+
}
|
|
16
|
+
/** 租户门户选择状态机返回数据类型 */
|
|
17
|
+
export interface TenantPortalDataType {
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
logo: string;
|
|
21
|
+
list: TenantPortalListType[];
|
|
22
|
+
}
|
|
23
|
+
export interface TenantPortalDataItem extends TenantPortalListType {
|
|
24
|
+
avatar?: AvatarProps;
|
|
25
|
+
extra?: React.ReactNode;
|
|
26
|
+
title?: string;
|
|
27
|
+
}
|
|
28
|
+
/** 租户门户相关事件 */
|
|
29
|
+
export interface TenantPortalEvents extends IG2Events {
|
|
30
|
+
onLogin?: (user: User, authClient: AuthenticationClient) => void;
|
|
31
|
+
/** 租户门户选择回调 */
|
|
32
|
+
onTenantSelect?: (data?: TenantPortalSelectType) => void;
|
|
33
|
+
}
|
|
@@ -8,7 +8,8 @@ export declare enum LoginMethods {
|
|
|
8
8
|
PhoneCode = "phone-code",
|
|
9
9
|
WxMinQr = "wechat-miniprogram-qrcode",
|
|
10
10
|
AD = "ad",
|
|
11
|
-
WechatMpQrcode = "wechatmp-qrcode"
|
|
11
|
+
WechatMpQrcode = "wechatmp-qrcode",
|
|
12
|
+
AuthingOtpPush = "authing-otp-push"
|
|
12
13
|
}
|
|
13
14
|
export declare enum OIDCConnectionMode {
|
|
14
15
|
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
@@ -177,6 +178,14 @@ export interface TabFieldsI18nItem {
|
|
|
177
178
|
[propName in Lang]?: string;
|
|
178
179
|
};
|
|
179
180
|
}
|
|
181
|
+
interface LoginTypeI18nProps {
|
|
182
|
+
tab: {
|
|
183
|
+
default: string;
|
|
184
|
+
i18n: {
|
|
185
|
+
[propName: string]: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
}
|
|
180
189
|
export interface ApplicationConfig {
|
|
181
190
|
id: string;
|
|
182
191
|
allowedOrigins: string[];
|
|
@@ -194,6 +203,7 @@ export interface ApplicationConfig {
|
|
|
194
203
|
name: string;
|
|
195
204
|
logo: string;
|
|
196
205
|
description?: string;
|
|
206
|
+
deviceFuncEnabled?: boolean;
|
|
197
207
|
redirectUris: string[];
|
|
198
208
|
registerDisabled: boolean;
|
|
199
209
|
mergeAdAndAccountPasswordLogin: boolean;
|
|
@@ -262,6 +272,12 @@ export interface ApplicationConfig {
|
|
|
262
272
|
socialLoginBtns: boolean;
|
|
263
273
|
userPasswordInput: boolean;
|
|
264
274
|
wxMpScanTab: boolean;
|
|
275
|
+
loginMethodsI18nDisplaySettings: {
|
|
276
|
+
password?: LoginTypeI18nProps;
|
|
277
|
+
verifyCode?: LoginTypeI18nProps;
|
|
278
|
+
ad?: LoginTypeI18nProps;
|
|
279
|
+
ldap?: LoginTypeI18nProps;
|
|
280
|
+
};
|
|
265
281
|
};
|
|
266
282
|
protocol: Protocol;
|
|
267
283
|
oidcConfig: OidcClientMetadata;
|
|
@@ -307,4 +323,15 @@ export interface ApplicationConfig {
|
|
|
307
323
|
mfa: {
|
|
308
324
|
faceScore: number;
|
|
309
325
|
};
|
|
326
|
+
authingOtpPushTabConfig: {
|
|
327
|
+
enabledLoginMethods: Array<string> | null;
|
|
328
|
+
validLoginMethods: Array<string> | null;
|
|
329
|
+
validRegisterMethods: Array<string> | null;
|
|
330
|
+
};
|
|
331
|
+
/** 是否开启自定义安全规则 */
|
|
332
|
+
customSecurityEnabled: boolean;
|
|
333
|
+
/** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
334
|
+
appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
335
|
+
/** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
336
|
+
userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
310
337
|
}
|
package/types/Type/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
|
|
2
3
|
import { GuardModuleType } from '../Guard/module';
|
|
3
4
|
import { FacePlugin } from '../_utils/facePlugin/interface';
|
|
@@ -12,6 +13,7 @@ export declare enum GuardMode {
|
|
|
12
13
|
export interface IG2FCProps extends IG2Events {
|
|
13
14
|
appId?: string;
|
|
14
15
|
tenantId?: string;
|
|
16
|
+
deviceId?: string;
|
|
15
17
|
config?: Partial<IG2Config>;
|
|
16
18
|
visible?: boolean;
|
|
17
19
|
initData?: any;
|
|
@@ -42,6 +44,7 @@ export interface IG2Config {
|
|
|
42
44
|
userpool?: string;
|
|
43
45
|
contentCss?: string;
|
|
44
46
|
target?: HTMLElement | string;
|
|
47
|
+
style?: React.CSSProperties;
|
|
45
48
|
__internalRequest__?: boolean;
|
|
46
49
|
__singleComponent__?: boolean;
|
|
47
50
|
__unAuthFlow__?: boolean;
|
|
@@ -43,6 +43,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
43
43
|
userpool?: string | undefined;
|
|
44
44
|
contentCss?: string | undefined;
|
|
45
45
|
target?: string | HTMLElement | undefined;
|
|
46
|
+
style?: import("react").CSSProperties | undefined;
|
|
46
47
|
__internalRequest__?: boolean | undefined;
|
|
47
48
|
__singleComponent__?: boolean | undefined;
|
|
48
49
|
__unAuthFlow__?: boolean | undefined;
|
|
@@ -100,6 +101,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
100
101
|
withCustomData?: boolean | undefined;
|
|
101
102
|
} | undefined;
|
|
102
103
|
_closeLoopCheckQrcode?: boolean | undefined;
|
|
104
|
+
goBack?: (() => void) | null | undefined;
|
|
103
105
|
};
|
|
104
106
|
guardPageConfig: GuardPageConfig;
|
|
105
107
|
} | {
|
|
@@ -47,6 +47,8 @@ export interface IGuardContext {
|
|
|
47
47
|
defaultLanguageConfig: Lang;
|
|
48
48
|
/** 租户信息获取和操作处理相关 */
|
|
49
49
|
tenantInstance?: MultipleTenant;
|
|
50
|
+
/** 判断是否是国外的用户池 */
|
|
51
|
+
isForeignUserpool: boolean;
|
|
50
52
|
}
|
|
51
53
|
export declare const createGuardXContext: () => {
|
|
52
54
|
Provider: React.FC<{
|
|
@@ -83,6 +85,7 @@ export declare const useGuardEvents: () => Partial<GuardEvents>;
|
|
|
83
85
|
export declare const useGuardModule: () => {
|
|
84
86
|
changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
|
|
85
87
|
backModule: (() => void) | undefined;
|
|
88
|
+
currentModule: ModuleState;
|
|
86
89
|
};
|
|
87
90
|
export declare const useGuardFinallyConfig: () => GuardLocalConfig;
|
|
88
91
|
export declare const useGuardContextLoaded: () => boolean;
|
|
@@ -154,3 +157,7 @@ export declare const useGuardPhoneRegex: () => RegExp | null;
|
|
|
154
157
|
export declare const useGuardDefaultLanguage: () => Lang;
|
|
155
158
|
/** 用来操作和获取租户相关的内容 */
|
|
156
159
|
export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
|
|
160
|
+
/** 当前人机验证策略 */
|
|
161
|
+
export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
|
|
162
|
+
/** 当前用户池是否是国外用户池 */
|
|
163
|
+
export declare const useIsForeignUserpool: () => boolean;
|
|
@@ -9,6 +9,7 @@ export declare class GuardHttp {
|
|
|
9
9
|
setUserpoolId(userpoolId: string): this;
|
|
10
10
|
setAppId(appId: string): this;
|
|
11
11
|
setTenantId(tenantId: string): this;
|
|
12
|
+
setDeviceId(deviceId: string): this;
|
|
12
13
|
setBaseUrl(baseUrl: string): this;
|
|
13
14
|
getHeaders: () => Record<string, string>;
|
|
14
15
|
get: <T = any>(path: string, query?: Record<string, any>, config?: any) => Promise<AuthingGuardResponse<T>>;
|
package/types/_utils/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare const getClassnames: (classnames: (string | boolean | undefined)[
|
|
|
27
27
|
* @param item
|
|
28
28
|
* @returns {boolean}
|
|
29
29
|
*/
|
|
30
|
-
export declare function isObject(item: any):
|
|
30
|
+
export declare function isObject(item: any): any;
|
|
31
31
|
/**
|
|
32
32
|
* https://www.itranslater.com/qa/details/2115518846294557696
|
|
33
33
|
* Deep merge two objects.
|
|
@@ -65,15 +65,16 @@ export declare enum PasswordStrength {
|
|
|
65
65
|
Low = 1,
|
|
66
66
|
Middle = 2,
|
|
67
67
|
High = 3,
|
|
68
|
-
AUTO = 4
|
|
68
|
+
AUTO = 4,
|
|
69
|
+
Custom = 5
|
|
69
70
|
}
|
|
70
71
|
export declare const PASSWORD_STRENGTH_TEXT_MAP: Record<PasswordStrength, {
|
|
71
72
|
placeholder: () => string;
|
|
72
73
|
validateMessage: () => string;
|
|
73
74
|
}>;
|
|
74
75
|
export declare const getSymbolTypeLength: (pwd: string) => number;
|
|
75
|
-
export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
|
|
76
|
-
export declare const getPasswordValidateRules: (strength?: PasswordStrength, customPasswordStrength?: any, customValidateTrigger?: string | undefined, fieldRequiredRuleMessage?: string | undefined) => Rule[];
|
|
76
|
+
export declare const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined, userId?: string | undefined) => Rule[];
|
|
77
|
+
export declare const getPasswordValidateRules: (strength?: PasswordStrength, customPasswordStrength?: any, customValidateTrigger?: string | undefined, fieldRequiredRuleMessage?: string | undefined, userId?: string | undefined) => Rule[];
|
|
77
78
|
export declare const sleep: (delay: number) => Promise<unknown>;
|
|
78
79
|
export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
|
|
79
80
|
export declare const transformMethod: (method: RegisterMethods | string) => string;
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.3.1";
|
|
1
|
+
declare const _default: "4.3.23.rc-1";
|
|
2
2
|
export default _default;
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019-present Authing
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/asset-manifest.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": {
|
|
3
|
-
"main.css": "/static/css/main.5aec6972.chunk.css",
|
|
4
|
-
"main.js": "/static/js/main.b635a15a.chunk.js",
|
|
5
|
-
"main.js.map": "/static/js/main.b635a15a.chunk.js.map",
|
|
6
|
-
"runtime-main.js": "/static/js/runtime-main.6f6a6483.js",
|
|
7
|
-
"runtime-main.js.map": "/static/js/runtime-main.6f6a6483.js.map",
|
|
8
|
-
"static/css/2.31681d53.chunk.css": "/static/css/2.31681d53.chunk.css",
|
|
9
|
-
"static/js/2.d2a1168e.chunk.js": "/static/js/2.d2a1168e.chunk.js",
|
|
10
|
-
"static/js/2.d2a1168e.chunk.js.map": "/static/js/2.d2a1168e.chunk.js.map",
|
|
11
|
-
"static/js/3.b3dd7130.chunk.js": "/static/js/3.b3dd7130.chunk.js",
|
|
12
|
-
"static/js/3.b3dd7130.chunk.js.map": "/static/js/3.b3dd7130.chunk.js.map",
|
|
13
|
-
"index.html": "/index.html",
|
|
14
|
-
"static/css/2.31681d53.chunk.css.map": "/static/css/2.31681d53.chunk.css.map",
|
|
15
|
-
"static/css/main.5aec6972.chunk.css.map": "/static/css/main.5aec6972.chunk.css.map",
|
|
16
|
-
"static/js/2.d2a1168e.chunk.js.LICENSE.txt": "/static/js/2.d2a1168e.chunk.js.LICENSE.txt",
|
|
17
|
-
"static/media/loading.3cf0104f.svg": "/static/media/loading.3cf0104f.svg"
|
|
18
|
-
},
|
|
19
|
-
"entrypoints": [
|
|
20
|
-
"static/js/runtime-main.6f6a6483.js",
|
|
21
|
-
"static/css/2.31681d53.chunk.css",
|
|
22
|
-
"static/js/2.d2a1168e.chunk.js",
|
|
23
|
-
"static/css/main.5aec6972.chunk.css",
|
|
24
|
-
"static/js/main.b635a15a.chunk.js"
|
|
25
|
-
]
|
|
26
|
-
}
|
package/dist/index.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!doctype html><html lang="zh-TW"><head><meta charset="utf-8"/><link rel="icon" href="https://files.authing.co/authing-console/login_logo.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Guard Examples</title><link href="/static/css/2.31681d53.chunk.css" rel="stylesheet"><link href="/static/css/main.5aec6972.chunk.css" rel="stylesheet"></head><body><div id="root"></div><script>!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],s=0,p=[];s<a.length;s++)i=a[s],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"b3dd7130"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this["webpackJsonp@authing/react-ui-components"]=this["webpackJsonp@authing/react-ui-components"]||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([])</script><script src="/static/js/2.d2a1168e.chunk.js"></script><script src="/static/js/main.b635a15a.chunk.js"></script></body></html>
|