@authing/guard-shim-react 4.5.47-bg.1 → 4.5.47-bg.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.
@@ -40,7 +40,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
40
40
  id: string;
41
41
  loginAccount?: string | undefined;
42
42
  usertype?: string | undefined;
43
- }, "way" | "tab" | "phoneCountryCode">) => void;
43
+ }, "tab" | "way" | "phoneCountryCode">) => void;
44
44
  setLoginWayByHttpData: (account: string, data: {
45
45
  username?: string | undefined;
46
46
  phone?: string | undefined;
@@ -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: "login" | "multiple") => void) | undefined;
65
+ referMultipleState: ((type: "multiple" | "login") => void) | undefined;
66
66
  backfillData: BackFillMultipleState | undefined;
67
67
  defaultQrWay: string | undefined;
68
68
  };
@@ -7,7 +7,10 @@ export declare enum MfaBusinessAction {
7
7
  VerifyFace = "verify-face",
8
8
  AssociateFace = "associate-face",
9
9
  PasskeyBind = "passkey-bind",
10
- PasskeyVerify = "passkey-verify"
10
+ PasskeyVerify = "passkey-verify",
11
+ GetFaceLivenessSession = "get-face-liveness-session",
12
+ GetFaceLivenessResult = "get-face-liveness-result",
13
+ VerifyFaceLiveness = "verify-face-liveness"
11
14
  }
12
15
  export declare const authFlow: (action: MfaBusinessAction, content: any) => Promise<AuthingGuardResponse<any>>;
13
16
  interface VerifySmsContent {
@@ -35,6 +38,13 @@ interface AssociateFaceContent {
35
38
  isExternalPhoto?: boolean;
36
39
  mfaToken?: string;
37
40
  }
41
+ interface GetFaceLivenessSessionContent {
42
+ mfaToken?: string;
43
+ }
44
+ interface GetFaceLivenessResultContent {
45
+ sessionId: string;
46
+ mfaToken?: string;
47
+ }
38
48
  type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON & {
39
49
  mfaToken?: string;
40
50
  };
@@ -54,6 +64,22 @@ export declare const VerifySms: (content: VerifySmsContent) => Promise<AuthingGu
54
64
  export declare const VerifyTotp: (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
55
65
  export declare const VerifyFace: (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
56
66
  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>>;
57
83
  export declare const GetPasskeyBindChallenge: (content: GetPasskeyBindChallengeParams) => Promise<AuthingGuardResponse<CredentialCreationOptionsJSON>>;
58
84
  export declare const GetPasskeyVerifyChallenge: (content: GetPasskeyVerifyChallengeParams) => Promise<AuthingGuardResponse<CredentialRequestOptionsJSON & {
59
85
  ticket: string;
@@ -66,5 +92,7 @@ export declare const useMfaBusinessRequest: () => {
66
92
  "associate-face": (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
67
93
  "passkey-bind": (content: BindPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
68
94
  "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>>;
69
97
  };
70
98
  export {};
@@ -0,0 +1,18 @@
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;
@@ -56,7 +56,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
56
56
  loginTabs?: LoginMethods[] | undefined;
57
57
  passwordLoginMethods?: string[] | undefined;
58
58
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
59
- socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
59
+ socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
60
60
  enterpriseConnections?: string[] | undefined;
61
61
  qrCodeScanOptions?: {
62
62
  extIdpConnId?: string | undefined;
@@ -124,7 +124,7 @@ export declare const useGuardAccountSelectInstance: () => {
124
124
  id: string;
125
125
  loginAccount?: string | undefined;
126
126
  usertype?: string | undefined;
127
- }, "way" | "tab" | "phoneCountryCode">) => void;
127
+ }, "tab" | "way" | "phoneCountryCode">) => void;
128
128
  setLoginWayByHttpData: (account: string, data: {
129
129
  username?: string | undefined;
130
130
  phone?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "4.5.47-bg.1",
3
+ "version": "4.5.47-bg.3",
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",