@authing/react-ui-components 4.4.3-lulu.0 → 4.4.3-lulu.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.4.3-lulu.0",
3
+ "version": "4.4.3-lulu.10",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -10,6 +10,7 @@
10
10
  "types"
11
11
  ],
12
12
  "dependencies": {
13
+ "@github/webauthn-json": "^2.1.1",
13
14
  "antd": "^4.8.0",
14
15
  "authing-js-sdk": "4.23.48",
15
16
  "classnames": "^2.3.1",
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface LoginWithPasskeyProps {
3
+ onLoginSuccess: any;
4
+ onLoginFailed: any;
5
+ }
6
+ export declare const PasskeyButton: (props: LoginWithPasskeyProps) => JSX.Element;
7
+ export {};
@@ -1,11 +1,15 @@
1
+ import { AuthingGuardResponse } from '../_utils/http';
2
+ import { CredentialCreationOptionsJSON, CredentialRequestOptionsJSON, PublicKeyCredentialWithAssertionJSON, PublicKeyCredentialWithAttestationJSON } from '@github/webauthn-json';
1
3
  export declare enum MfaBusinessAction {
2
4
  VerifyEmail = "verify-email",
3
5
  VerifySms = "verify-sms",
4
6
  VerifyTotp = "verify-totp",
5
7
  VerifyFace = "verify-face",
6
- AssociateFace = "associate-face"
8
+ AssociateFace = "associate-face",
9
+ PasskeyBind = "passkey-bind",
10
+ PasskeyVerify = "passkey-verify"
7
11
  }
8
- export declare const authFlow: (action: MfaBusinessAction, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
12
+ export declare const authFlow: (action: MfaBusinessAction, content: any) => Promise<AuthingGuardResponse<any>>;
9
13
  interface VerifySmsContent {
10
14
  phone: string;
11
15
  code: string;
@@ -31,16 +35,33 @@ interface AssociateFaceContent {
31
35
  isExternalPhoto?: boolean;
32
36
  mfaToken?: string;
33
37
  }
34
- export declare const VerifyEmail: (content: VerifyEmailContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
35
- export declare const VerifySms: (content: VerifySmsContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
36
- export declare const VerifyTotp: (content: VerifyTotpContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
37
- export declare const VerifyFace: (content: VerifyFaceContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
38
- export declare const AssociateFace: (content: AssociateFaceContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
38
+ export declare const VerifyEmail: (content: VerifyEmailContent) => Promise<AuthingGuardResponse<any>>;
39
+ export declare const VerifySms: (content: VerifySmsContent) => Promise<AuthingGuardResponse<any>>;
40
+ export declare const VerifyTotp: (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
41
+ export declare const VerifyFace: (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
42
+ export declare const AssociateFace: (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
43
+ declare type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON;
44
+ interface VerifyPasskeyContent {
45
+ credential: PublicKeyCredentialWithAssertionJSON;
46
+ ticket: string;
47
+ }
48
+ interface GetPasskeyBindChallengeParams {
49
+ mfaToken: string;
50
+ }
51
+ interface GetPasskeyVerifyChallengeParams {
52
+ mfaToken: string;
53
+ }
54
+ export declare const GetPasskeyBindChallenge: (content: GetPasskeyBindChallengeParams) => Promise<AuthingGuardResponse<CredentialCreationOptionsJSON>>;
55
+ export declare const GetPasskeyVerifyChallenge: (content: GetPasskeyVerifyChallengeParams) => Promise<AuthingGuardResponse<CredentialRequestOptionsJSON & {
56
+ ticket: string;
57
+ }>>;
39
58
  export declare const useMfaBusinessRequest: () => {
40
- "verify-email": (content: VerifyEmailContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
41
- "verify-sms": (content: VerifySmsContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
42
- "verify-totp": (content: VerifyTotpContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
43
- "verify-face": (content: VerifyFaceContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
44
- "associate-face": (content: AssociateFaceContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
59
+ "verify-email": (content: VerifyEmailContent) => Promise<AuthingGuardResponse<any>>;
60
+ "verify-sms": (content: VerifySmsContent) => Promise<AuthingGuardResponse<any>>;
61
+ "verify-totp": (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
62
+ "verify-face": (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
63
+ "associate-face": (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
64
+ "passkey-bind": (content: BindPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
65
+ "passkey-verify": (content: VerifyPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
45
66
  };
46
67
  export {};
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { MFAType } from '../interface';
3
+ interface BindPasskeyProps {
4
+ mfaToken: string;
5
+ mfaLogin: (code: any, data: any, message?: string) => void;
6
+ mfaConfigsMap: Map<MFAType, boolean>;
7
+ }
8
+ interface VerifyPasskeyProps {
9
+ mfaToken: string;
10
+ mfaLogin: (code: any, data: any, message?: string) => void;
11
+ }
12
+ export declare type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
13
+ passkeyEnabled: boolean;
14
+ };
15
+ export declare const MFAPasskey: React.FC<MFAPasskeyProps>;
16
+ export {};
@@ -11,7 +11,8 @@ export declare enum MFAType {
11
11
  SMS = "SMS",
12
12
  EMAIL = "EMAIL",
13
13
  TOTP = "OTP",
14
- FACE = "FACE"
14
+ FACE = "FACE",
15
+ PASSKEY = "PASSKEY"
15
16
  }
16
17
  export interface GuardMFAInitData {
17
18
  mfaToken: string;
@@ -1,4 +1,5 @@
1
1
  import { Lang } from '..';
2
+ import { MFAType } from '../MFA/interface';
2
3
  import { PasswordStrength } from '../_utils';
3
4
  export * from 'authing-js-sdk';
4
5
  export declare enum LoginMethods {
@@ -10,7 +11,8 @@ export declare enum LoginMethods {
10
11
  WxMinQr = "wechat-miniprogram-qrcode",
11
12
  AD = "ad",
12
13
  WechatMpQrcode = "wechatmp-qrcode",
13
- AuthingOtpPush = "authing-otp-push"
14
+ AuthingOtpPush = "authing-otp-push",
15
+ Passkey = "passkey"
14
16
  }
15
17
  export declare enum OIDCConnectionMode {
16
18
  FRONT_CHANNEL = "FRONT_CHANNEL",
@@ -293,6 +295,10 @@ export interface ApplicationConfig {
293
295
  welcomeMessage: any;
294
296
  skipComplateFileds: boolean;
295
297
  selfUnlockStrategy: 'captcha' | 'password-captcha';
298
+ mfaBindConfigs?: {
299
+ mfa: MFAType;
300
+ changeable: boolean;
301
+ }[];
296
302
  defaultLanguageConfig: Lang;
297
303
  /**
298
304
  * 是否开启账号切换
@@ -320,6 +326,7 @@ export interface ApplicationConfig {
320
326
  isTenantDefault?: boolean;
321
327
  /** 租户详情 */
322
328
  tenantInfo?: Record<string, any>;
329
+ passkeyEnabled: boolean;
323
330
  /** mfa 相关 */
324
331
  mfa: {
325
332
  faceScore: number;
@@ -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): any;
30
+ export declare function isObject(item: any): boolean;
31
31
  /**
32
32
  * https://www.itranslater.com/qa/details/2115518846294557696
33
33
  * Deep merge two objects.
@@ -0,0 +1,3 @@
1
+ import { CredentialCreationOptionsJSON, CredentialRequestOptionsJSON } from '@github/webauthn-json';
2
+ export declare const registerPasskey: (challenge: CredentialCreationOptionsJSON) => Promise<import("@github/webauthn-json").PublicKeyCredentialWithAttestationJSON | undefined>;
3
+ export declare const verifyPasskey: (challenge: CredentialRequestOptionsJSON) => Promise<import("@github/webauthn-json").PublicKeyCredentialWithAssertionJSON | undefined>;
@@ -1,2 +1,2 @@
1
- declare const _default: "4.4.3-lulu.0";
1
+ declare const _default: "4.4.3-lulu.10";
2
2
  export default _default;