@authing/guard-shim-react 4.5.47-bg.11 → 4.5.47-bg.13

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.
@@ -33,7 +33,8 @@ export declare enum GuardModuleType {
33
33
  INVITE_EXPIRE = "inviteExpire",// 邀请链接过期
34
34
  INVITE_PAGE_EXPIRE = "invitePageExpire",// 页面过期
35
35
  INVITE_SUCCESS = "inviteSuccess",// 邀请成功
36
- RESET_PASSWORD = "resetPassword"
36
+ RESET_PASSWORD = "resetPassword",
37
+ REGISTER_ACCOUNT_TYPE_SELECT = "accountTypeSelect"
37
38
  }
38
39
  export interface GuardModuleAction {
39
40
  action: string;
@@ -62,7 +62,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
62
62
  getOriginAccount: () => string;
63
63
  getOriginWay: () => string;
64
64
  } | undefined;
65
- referMultipleState: ((type: "multiple" | "login") => void) | undefined;
65
+ referMultipleState: ((type: "login" | "multiple") => void) | undefined;
66
66
  backfillData: BackFillMultipleState | undefined;
67
67
  defaultQrWay: string | undefined;
68
68
  };
@@ -8,8 +8,6 @@ export interface LoginConfig extends IG2Config {
8
8
  disableRegister?: boolean;
9
9
  defaultLoginMethod?: LoginMethods;
10
10
  loginMethods?: LoginMethods[];
11
- defaultLoginTab?: LoginMethods;
12
- loginTabs?: LoginMethods[];
13
11
  passwordLoginMethods?: string[];
14
12
  socialConnections?: SocialConnectionProvider[];
15
13
  socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
@@ -7,10 +7,7 @@ export declare enum MfaBusinessAction {
7
7
  VerifyFace = "verify-face",
8
8
  AssociateFace = "associate-face",
9
9
  PasskeyBind = "passkey-bind",
10
- PasskeyVerify = "passkey-verify",
11
- GetFaceLivenessSession = "get-face-liveness-session",
12
- GetFaceLivenessResult = "get-face-liveness-result",
13
- VerifyFaceLiveness = "verify-face-liveness"
10
+ PasskeyVerify = "passkey-verify"
14
11
  }
15
12
  export declare const authFlow: (action: MfaBusinessAction, content: any) => Promise<AuthingGuardResponse<any>>;
16
13
  interface VerifySmsContent {
@@ -38,20 +35,10 @@ interface AssociateFaceContent {
38
35
  isExternalPhoto?: boolean;
39
36
  mfaToken?: string;
40
37
  }
41
- interface GetFaceLivenessSessionContent {
42
- mfaToken?: string;
43
- }
44
- interface GetFaceLivenessResultContent {
45
- sessionId: string;
46
- mfaToken?: string;
47
- }
48
- type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON & {
49
- mfaToken?: string;
50
- };
38
+ type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON;
51
39
  interface VerifyPasskeyContent {
52
40
  credential: PublicKeyCredentialWithAssertionJSON;
53
41
  ticket: string;
54
- mfaToken?: string;
55
42
  }
56
43
  interface GetPasskeyBindChallengeParams {
57
44
  mfaToken: string;
@@ -64,22 +51,6 @@ export declare const VerifySms: (content: VerifySmsContent) => Promise<AuthingGu
64
51
  export declare const VerifyTotp: (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
65
52
  export declare const VerifyFace: (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
66
53
  export declare const AssociateFace: (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
67
- /**
68
- * 获取 AWS 活体检测 Session
69
- * POST /api/v2/mfa/face/liveness/session
70
- */
71
- export declare const GetFaceLivenessSession: (content: GetFaceLivenessSessionContent) => Promise<AuthingGuardResponse<any>>;
72
- /**
73
- * 获取 AWS 活体检测结果
74
- * GET /api/v2/mfa/face/liveness/result?sessionId=xxx
75
- */
76
- export declare const GetFaceLivenessResult: (content: GetFaceLivenessResultContent) => Promise<AuthingGuardResponse<any>>;
77
- /**
78
- * AWS 临时凭证接口(占位)
79
- * GET /api/credentials
80
- * TODO: 后端需要实现此接口
81
- */
82
- export declare const GetAwsCredentials: () => Promise<AuthingGuardResponse<any>>;
83
54
  export declare const GetPasskeyBindChallenge: (content: GetPasskeyBindChallengeParams) => Promise<AuthingGuardResponse<CredentialCreationOptionsJSON>>;
84
55
  export declare const GetPasskeyVerifyChallenge: (content: GetPasskeyVerifyChallengeParams) => Promise<AuthingGuardResponse<CredentialRequestOptionsJSON & {
85
56
  ticket: string;
@@ -92,7 +63,5 @@ export declare const useMfaBusinessRequest: () => {
92
63
  "associate-face": (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
93
64
  "passkey-bind": (content: BindPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
94
65
  "passkey-verify": (content: VerifyPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
95
- "get-face-liveness-session": (content: GetFaceLivenessSessionContent) => Promise<AuthingGuardResponse<any>>;
96
- "get-face-liveness-result": (content: GetFaceLivenessResultContent) => Promise<AuthingGuardResponse<any>>;
97
66
  };
98
67
  export {};
@@ -8,6 +8,7 @@ interface BindPasskeyProps {
8
8
  interface VerifyPasskeyProps {
9
9
  mfaToken: string;
10
10
  mfaLogin: (code: any, data: any, message?: string) => void;
11
+ mfaConfigsMap: Map<MFAType, boolean>;
11
12
  }
12
13
  export type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
13
14
  passkeyEnabled: boolean;
@@ -0,0 +1,3 @@
1
+ import { React } from 'shim-react';
2
+ import './style.less';
3
+ export declare const GuardRegisterAccountTypeView: React.FC;
@@ -8,4 +8,7 @@ export interface RegisterWithEmailCodeProps {
8
8
  publicConfig?: ApplicationConfig;
9
9
  registeContext?: any;
10
10
  }
11
+ /**
12
+ * @deprecated 废弃 🚒
13
+ */
11
14
  export declare const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
@@ -7,4 +7,7 @@ export interface RegisterWithPhoneProps {
7
7
  publicConfig?: ApplicationConfig;
8
8
  registeContext?: any;
9
9
  }
10
+ /**
11
+ * @deprecated 废弃 🚒
12
+ */
10
13
  export declare const RegisterWithPhone: React.FC<RegisterWithPhoneProps>;
@@ -9,5 +9,8 @@ export interface SendCodeByEmailProps extends InputProps {
9
9
  fieldName?: string;
10
10
  autoSubmit?: boolean;
11
11
  scene: EmailScene;
12
+ captchaCode?: string;
13
+ onSendCodeError?: any;
14
+ codeFieldName?: string;
12
15
  }
13
16
  export declare const SendCodeByEmail: React.FC<SendCodeByEmailProps>;
@@ -7,6 +7,7 @@ export interface SendCodeByPhoneProps extends InputProps {
7
7
  form?: any;
8
8
  onSendCodeBefore?: any;
9
9
  onSendCodeAfter?: any;
10
+ onSendCodeError?: any;
10
11
  fieldName?: string;
11
12
  autoSubmit?: boolean;
12
13
  scene: SceneType;
@@ -17,8 +17,7 @@ export declare enum LoginMethods {
17
17
  WECHATWORKAGENCYQRCONNECT = "wechatwork-agency-qrcode",// 代开发形式的内部应用
18
18
  DingTalkQrcode = "dingtalk-qrcode",//钉钉扫码
19
19
  Passkey = "passkey",// passkey
20
- ZJZWFWQrcode = "zjzwfw-qrcode",// 浙江政务钉
21
- MFA = "mfa"
20
+ ZJZWFWQrcode = "zjzwfw-qrcode"
22
21
  }
23
22
  export declare enum OIDCConnectionMode {
24
23
  FRONT_CHANNEL = "FRONT_CHANNEL",
@@ -182,9 +181,6 @@ export interface ApplicationVerifyCodeTabConfig {
182
181
  validRegisterMethods?: string[];
183
182
  validLoginMethods?: string[];
184
183
  }
185
- export interface ApplicationMfaTabConfig {
186
- validLoginMethods?: MfaLoginMethods[];
187
- }
188
184
  export interface Agreement {
189
185
  id: number;
190
186
  title: string;
@@ -195,7 +191,6 @@ export interface Agreement {
195
191
  export type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
196
192
  export type VerifyLoginMethods = 'email-code' | 'phone-code';
197
193
  export type ComplateFiledsPlace = 'register' | 'login';
198
- export type MfaLoginMethods = 'email-mfa' | 'phone-mfa';
199
194
  export interface TabFieldsI18nItem {
200
195
  key: string;
201
196
  label: string;
@@ -318,7 +313,6 @@ export interface ApplicationConfig {
318
313
  verifyCode?: LoginTypeI18nProps;
319
314
  ad?: LoginTypeI18nProps;
320
315
  ldap?: LoginTypeI18nProps;
321
- mfa?: LoginTypeI18nProps;
322
316
  };
323
317
  idpLayout?: {
324
318
  maxConns: number;
@@ -330,7 +324,6 @@ export interface ApplicationConfig {
330
324
  oidcConfig: OidcClientMetadata;
331
325
  passwordTabConfig: ApplicationPasswordTabConfig;
332
326
  verifyCodeTabConfig?: ApplicationVerifyCodeTabConfig;
333
- mfaTabConfig?: ApplicationMfaTabConfig;
334
327
  agreementEnabled: boolean;
335
328
  agreements: Agreement[];
336
329
  customPasswordStrength: any;
@@ -355,6 +348,8 @@ export interface ApplicationConfig {
355
348
  enabledMailPwdRegisterValid?: boolean;
356
349
  /** 是否开启邮箱域名匹配登录 */
357
350
  enabledMatchEmailDomain?: boolean;
351
+ /** 注册是否开启账号类型选择 */
352
+ enableAccountTypeSelect?: boolean;
358
353
  /**
359
354
  * 登录注册排序
360
355
  */
@@ -415,6 +410,23 @@ export interface ApplicationConfig {
415
410
  switch: 'OFF' | 'ON' | 'CONDON';
416
411
  };
417
412
  };
413
+ /** 注册阶段邮件安全配置 */
414
+ registerEmailConfig?: {
415
+ robot: {
416
+ switch: 'OFF' | 'ON' | 'CONDON';
417
+ };
418
+ };
419
+ /** 登录阶段邮件安全配置 */
420
+ loginEmailConfig?: {
421
+ robot: {
422
+ switch: 'OFF' | 'ON' | 'CONDON';
423
+ };
424
+ };
425
+ forgetPasswordEmailConfig?: {
426
+ robot: {
427
+ switch: 'OFF' | 'ON' | 'CONDON';
428
+ };
429
+ };
418
430
  /** 特殊浏览器匹配字符串 */
419
431
  specialBrowserSymbols?: string[];
420
432
  resetPwdTipsConfig?: {
@@ -435,4 +447,5 @@ export interface ApplicationConfig {
435
447
  title: I18nLang;
436
448
  desc: I18nLang;
437
449
  };
450
+ resetPwdSelectEmailPhone?: 'email' | 'phone' | 'email_and_phone';
438
451
  }
@@ -61,10 +61,6 @@ export declare enum InputMethod {
61
61
  EmailCode = "email-code",
62
62
  PhoneCode = "phone-code"
63
63
  }
64
- export declare enum MFAInputMethod {
65
- PhoneMfa = "phone-mfa",
66
- EmailMfa = "email-mfa"
67
- }
68
64
  export declare enum GuardPageSene {
69
65
  Global = "global"
70
66
  }
@@ -52,11 +52,9 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
52
52
  disableResetPwd?: boolean | undefined;
53
53
  defaultLoginMethod?: LoginMethods | undefined;
54
54
  loginMethods?: LoginMethods[] | undefined;
55
- defaultLoginTab?: LoginMethods | undefined;
56
- loginTabs?: LoginMethods[] | undefined;
57
55
  passwordLoginMethods?: string[] | undefined;
58
56
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
59
- socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
57
+ socialConnectionsBtnShape?: "button" | "default" | "icon" | undefined;
60
58
  enterpriseConnections?: string[] | undefined;
61
59
  qrCodeScanOptions?: {
62
60
  extIdpConnId?: string | undefined;
@@ -164,5 +164,7 @@ export declare const useGuardDefaultLanguage: () => Lang;
164
164
  export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
165
165
  /** 当前人机验证策略 */
166
166
  export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
167
- /** 当前应用是否开启人机验证策略 */
168
- export declare const useCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => boolean;
167
+ /** 当前应用短信是否开启人机验证策略 */
168
+ export declare const useSmsCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => boolean;
169
+ /** 当前应用邮件是否开启人机验证策略 */
170
+ export declare const useEmailCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => boolean;
@@ -7,3 +7,7 @@ export declare const popupCenter: (url: string, { w, h }?: {
7
7
  w: number;
8
8
  h: number;
9
9
  }) => void;
10
+ export declare const larkPopupCenter: (url: string, { w, h }?: {
11
+ w: number;
12
+ h: number;
13
+ }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "4.5.47-bg.11",
3
+ "version": "4.5.47-bg.13",
4
4
  "description": "Guard shim for react 16 / 17, only be used to internal",
5
5
  "types": "dist/typings/src/index.d.ts",
6
6
  "module": "dist/guard.min.js",
@@ -1,17 +0,0 @@
1
- import { MFAInputMethod } from '../../../Type';
2
- import { ReactNode } from 'shim-react';
3
- interface MFAFormItemIdentifyProps {
4
- name: string;
5
- className?: string;
6
- form: any;
7
- currentMethod: MFAInputMethod;
8
- methods: MFAInputMethod[];
9
- areaCode?: string;
10
- checkRepeat?: boolean;
11
- checkExist?: boolean;
12
- required?: boolean;
13
- placeholder?: string;
14
- children?: ReactNode;
15
- }
16
- export declare function MFAFormItemIdentify(props: MFAFormItemIdentifyProps): JSX.Element;
17
- export {};
@@ -1,7 +0,0 @@
1
- import { InputProps } from 'shim-antd';
2
- import { React } from 'shim-react';
3
- import { MfaLoginMethods } from '../../../Type/application';
4
- export interface InputIdentifyProps extends InputProps {
5
- methods: MfaLoginMethods[];
6
- }
7
- export declare const InputIdentify: React.FC<InputIdentifyProps>;
@@ -1,2 +0,0 @@
1
- declare const LoginWithMFA: (props: any) => JSX.Element;
2
- export { LoginWithMFA };
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import '@aws-amplify/ui-react/styles.css';
3
- interface AwsFaceLivenessDetectorProps {
4
- sessionId: string;
5
- region?: string;
6
- onAnalysisComplete?: () => void | Promise<void>;
7
- onError?: (error: any) => void;
8
- credentials?: {
9
- accessKeyId: string;
10
- secretAccessKey: string;
11
- sessionToken: string;
12
- };
13
- }
14
- /**
15
- * AWS Face Liveness 检测组件
16
- */
17
- export declare const AwsFaceLivenessDetector: React.FC<AwsFaceLivenessDetectorProps>;
18
- export default AwsFaceLivenessDetector;