@authing/guard-shim-react18 4.5.20-nington.15 → 4.5.22-alpha.0
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/dist/guard.min.css +1 -1
- package/dist/guard.min.js +2179 -2142
- package/dist/typings/src/CompleteInfo/core/completeInfo.d.ts +1 -0
- package/dist/typings/src/Guard/module.d.ts +8 -1
- package/dist/typings/src/Invitation/Application/index.d.ts +2 -0
- package/dist/typings/src/Invitation/AuthenticationBind/index.d.ts +2 -0
- package/dist/typings/src/Invitation/Complete/index.d.ts +2 -0
- package/dist/typings/src/Invitation/Error/index.d.ts +2 -0
- package/dist/typings/src/Invitation/Success/index.d.ts +1 -0
- package/dist/typings/src/Invitation/interface.d.ts +66 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/types.d.ts +0 -1
- package/dist/typings/src/MFA/businessRequest.d.ts +12 -40
- package/dist/typings/src/MFA/interface.d.ts +1 -4
- package/dist/typings/src/Message/index.d.ts +9 -0
- package/dist/typings/src/Register/components/Agreements/index.d.ts +1 -1
- package/dist/typings/src/Type/application.d.ts +1 -1
- package/dist/typings/src/Type/index.d.ts +2 -6
- package/dist/typings/src/_utils/compute.d.ts +1 -2
- package/dist/typings/src/_utils/locales/index.d.ts +0 -1
- package/dist/typings/src/_utils/responseManagement/interface.d.ts +3 -1
- package/package.json +1 -1
- package/dist/typings/src/MFA/core/nington.d.ts +0 -19
- package/dist/typings/src/MFA/core/passkey.d.ts +0 -14
- package/dist/typings/src/_utils/passkey.d.ts +0 -3
|
@@ -3,6 +3,7 @@ import { CompleteInfoMetaData, CompleteInfoRequest } from '../interface';
|
|
|
3
3
|
export interface CompleteInfoProps {
|
|
4
4
|
metaData: CompleteInfoMetaData[];
|
|
5
5
|
businessRequest: (data: CompleteInfoRequest) => Promise<void>;
|
|
6
|
+
extendsFieldsI18n?: any;
|
|
6
7
|
}
|
|
7
8
|
export interface FieldMetadata {
|
|
8
9
|
key: string;
|
|
@@ -25,7 +25,14 @@ export declare enum GuardModuleType {
|
|
|
25
25
|
TENANT_PORTAL = "tenant-portal",
|
|
26
26
|
New_SUBMIT_SUCCESS = "newSubmitSuccess",
|
|
27
27
|
SELECT_ACCOUNT_2_LOGIN = "selectAccout2Login",
|
|
28
|
-
RESET_ACCOUNT_NAME = "resetAccountName"
|
|
28
|
+
RESET_ACCOUNT_NAME = "resetAccountName",
|
|
29
|
+
APPLY_INVITATION = "applyInvitation",
|
|
30
|
+
MESSAGE = "message",
|
|
31
|
+
INVITE_AUTH = "inviteAuth",
|
|
32
|
+
INVITE_COMPLETE = "inviteComplete",
|
|
33
|
+
INVITE_EXPIRE = "inviteExpire",
|
|
34
|
+
INVITE_PAGE_EXPIRE = "invitePageExpire",
|
|
35
|
+
INVITE_SUCCESS = "inviteSuccess"
|
|
29
36
|
}
|
|
30
37
|
export interface GuardModuleAction {
|
|
31
38
|
action: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GuardInviteSuccessView: () => JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { GuardModuleType } from '../Guard/module';
|
|
2
|
+
import { Lang } from '../Type';
|
|
3
|
+
export interface InviteContext {
|
|
4
|
+
token: string;
|
|
5
|
+
email: string | null;
|
|
6
|
+
ticket: string;
|
|
7
|
+
enabledIdentifierCodeConfig: boolean;
|
|
8
|
+
enabledInfoFill: boolean;
|
|
9
|
+
allowSkipBindExtIdp: boolean;
|
|
10
|
+
sendVerifyCodeMethod: 'prioritySMS' | 'priorityEmail';
|
|
11
|
+
phoneCountryCode: string | null;
|
|
12
|
+
phone: string | null;
|
|
13
|
+
username: string | null;
|
|
14
|
+
name: string | null;
|
|
15
|
+
verifyCodeMaxErrCount: number;
|
|
16
|
+
extendsFieldsI18n?: {
|
|
17
|
+
[key: string]: Record<Lang, {
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
value: string;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
extendsFieldsOptions?: {
|
|
23
|
+
key: string;
|
|
24
|
+
options: {
|
|
25
|
+
value: string;
|
|
26
|
+
label: string;
|
|
27
|
+
}[];
|
|
28
|
+
}[];
|
|
29
|
+
extendsFields: any;
|
|
30
|
+
registerInfoFillMsg?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface GuardInviteLoginInitData extends Partial<InviteContext> {
|
|
33
|
+
canBack?: boolean;
|
|
34
|
+
verifyAccount: string;
|
|
35
|
+
context: any;
|
|
36
|
+
originModule: GuardModuleType;
|
|
37
|
+
originContext: any;
|
|
38
|
+
}
|
|
39
|
+
export interface GuardInviteCompleteInitData extends Partial<GuardInviteLoginInitData> {
|
|
40
|
+
metaData: any;
|
|
41
|
+
}
|
|
42
|
+
export interface GuardInviteIdentityBindInitData extends Partial<GuardInviteLoginInitData> {
|
|
43
|
+
weComConfig: {
|
|
44
|
+
QRConfig: any;
|
|
45
|
+
id: string;
|
|
46
|
+
isDefault: boolean;
|
|
47
|
+
title: string;
|
|
48
|
+
};
|
|
49
|
+
isNew: boolean;
|
|
50
|
+
socialConnections: any[];
|
|
51
|
+
}
|
|
52
|
+
export interface EyGuardProtocolInitData {
|
|
53
|
+
onAcceptHandle: () => void;
|
|
54
|
+
onRejectHandle: () => void;
|
|
55
|
+
mode: 'Guard' | 'Portal';
|
|
56
|
+
}
|
|
57
|
+
export interface EyLoginProps {
|
|
58
|
+
onBeforeLogin?: (loginInfo: any) => void;
|
|
59
|
+
onLoginSuccess?: (data: any, message?: string) => void;
|
|
60
|
+
onLoginFailed?: (code: number, data: any, message?: string) => void;
|
|
61
|
+
}
|
|
62
|
+
export declare const useRegisterHandleHook: (initData: any, submitButtonRef?: {
|
|
63
|
+
current: {
|
|
64
|
+
onSpin: (arg0: boolean) => void;
|
|
65
|
+
};
|
|
66
|
+
} | undefined) => (context: any) => Promise<void>;
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { CredentialCreationOptionsJSON, CredentialRequestOptionsJSON, PublicKeyCredentialWithAssertionJSON, PublicKeyCredentialWithAttestationJSON } from '@github/webauthn-json';
|
|
2
|
-
import { AuthingGuardResponse } from '../_utils/http';
|
|
3
1
|
export declare enum MfaBusinessAction {
|
|
4
2
|
VerifyEmail = "verify-email",
|
|
5
3
|
VerifySms = "verify-sms",
|
|
6
4
|
VerifyTotp = "verify-totp",
|
|
7
|
-
VerifyNington = "verify-nington",
|
|
8
5
|
VerifyFace = "verify-face",
|
|
9
|
-
AssociateFace = "associate-face"
|
|
10
|
-
PasskeyBind = "passkey-bind",
|
|
11
|
-
PasskeyVerify = "passkey-verify"
|
|
6
|
+
AssociateFace = "associate-face"
|
|
12
7
|
}
|
|
13
|
-
export declare const authFlow: (action: MfaBusinessAction, content: any) => Promise<AuthingGuardResponse<any>>;
|
|
8
|
+
export declare const authFlow: (action: MfaBusinessAction, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
14
9
|
interface VerifySmsContent {
|
|
15
10
|
phone: string;
|
|
16
11
|
code: string;
|
|
@@ -26,10 +21,6 @@ interface VerifyTotpContent {
|
|
|
26
21
|
totp: string;
|
|
27
22
|
mfaToken?: string;
|
|
28
23
|
}
|
|
29
|
-
interface VerifyNingtonContent {
|
|
30
|
-
totp: string;
|
|
31
|
-
mfaToken?: string;
|
|
32
|
-
}
|
|
33
24
|
interface VerifyFaceContent {
|
|
34
25
|
photo: string;
|
|
35
26
|
mfaToken?: string;
|
|
@@ -40,35 +31,16 @@ interface AssociateFaceContent {
|
|
|
40
31
|
isExternalPhoto?: boolean;
|
|
41
32
|
mfaToken?: string;
|
|
42
33
|
}
|
|
43
|
-
declare
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
interface GetPasskeyBindChallengeParams {
|
|
49
|
-
mfaToken: string;
|
|
50
|
-
}
|
|
51
|
-
interface GetPasskeyVerifyChallengeParams {
|
|
52
|
-
mfaToken: string;
|
|
53
|
-
}
|
|
54
|
-
export declare const VerifyEmail: (content: VerifyEmailContent) => Promise<AuthingGuardResponse<any>>;
|
|
55
|
-
export declare const VerifySms: (content: VerifySmsContent) => Promise<AuthingGuardResponse<any>>;
|
|
56
|
-
export declare const VerifyTotp: (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
|
|
57
|
-
export declare const VerifyNington: (content: VerifyNingtonContent) => Promise<AuthingGuardResponse<any>>;
|
|
58
|
-
export declare const VerifyFace: (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
59
|
-
export declare const AssociateFace: (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
60
|
-
export declare const GetPasskeyBindChallenge: (content: GetPasskeyBindChallengeParams) => Promise<AuthingGuardResponse<CredentialCreationOptionsJSON>>;
|
|
61
|
-
export declare const GetPasskeyVerifyChallenge: (content: GetPasskeyVerifyChallengeParams) => Promise<AuthingGuardResponse<CredentialRequestOptionsJSON & {
|
|
62
|
-
ticket: string;
|
|
63
|
-
}>>;
|
|
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>>;
|
|
64
39
|
export declare const useMfaBusinessRequest: () => {
|
|
65
|
-
"verify-email": (content: VerifyEmailContent) => Promise<AuthingGuardResponse<any>>;
|
|
66
|
-
"verify-sms": (content: VerifySmsContent) => Promise<AuthingGuardResponse<any>>;
|
|
67
|
-
"verify-totp": (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
|
|
68
|
-
"verify-face": (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
69
|
-
"associate-face": (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
70
|
-
"passkey-bind": (content: BindPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
|
|
71
|
-
"passkey-verify": (content: VerifyPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
|
|
72
|
-
"verify-nington": (content: VerifyNingtonContent) => Promise<AuthingGuardResponse<any>>;
|
|
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>>;
|
|
73
45
|
};
|
|
74
46
|
export {};
|
|
@@ -11,9 +11,7 @@ export declare enum MFAType {
|
|
|
11
11
|
SMS = "SMS",
|
|
12
12
|
EMAIL = "EMAIL",
|
|
13
13
|
TOTP = "OTP",
|
|
14
|
-
FACE = "FACE"
|
|
15
|
-
PASSKEY = "PASSKEY",
|
|
16
|
-
NINGTON = "NINGTON"
|
|
14
|
+
FACE = "FACE"
|
|
17
15
|
}
|
|
18
16
|
export interface GuardMFAInitData {
|
|
19
17
|
mfaToken: string;
|
|
@@ -25,7 +23,6 @@ export interface GuardMFAInitData {
|
|
|
25
23
|
phoneCountryCode?: string;
|
|
26
24
|
faceMfaEnabled: boolean;
|
|
27
25
|
totpMfaEnabled: boolean;
|
|
28
|
-
ningTonMfaEnable: boolean;
|
|
29
26
|
email?: string;
|
|
30
27
|
phone?: string;
|
|
31
28
|
avatar?: string;
|
|
@@ -3,7 +3,7 @@ import './style.less';
|
|
|
3
3
|
import { Agreement } from '../../../Type/application';
|
|
4
4
|
export interface AgreementsProps {
|
|
5
5
|
value?: boolean;
|
|
6
|
-
onChange?: (value: boolean
|
|
6
|
+
onChange?: (value: boolean) => void;
|
|
7
7
|
style?: React.CSSProperties;
|
|
8
8
|
agreements: Agreement[];
|
|
9
9
|
showError?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
|
|
2
|
-
import { MFAType } from '
|
|
2
|
+
import { MFAType } from '../MFA/interface';
|
|
3
3
|
import { PasswordStrength } from '../_utils';
|
|
4
4
|
export * from 'authing-js-sdk';
|
|
5
5
|
export declare enum LoginMethods {
|
|
@@ -82,10 +82,6 @@ export declare enum EmailScene {
|
|
|
82
82
|
RESET_PASSWORD_VERIFY_CODE = "RESET_PASSWORD_VERIFY_CODE",
|
|
83
83
|
EMAIL_BIND_VERIFY_CODE = "EMAIL_BIND_VERIFY_CODE",
|
|
84
84
|
EMAIL_UNBIND_VERIFY_CODE = "EMAIL_UNBIND_VERIFY_CODE",
|
|
85
|
-
SELF_UNLOCKING_VERIFY_CODE = "SELF_UNLOCKING_VERIFY_CODE"
|
|
86
|
-
|
|
87
|
-
export declare enum ForcedModifyPwdCycleUnit {
|
|
88
|
-
Day = "DAY",
|
|
89
|
-
Month = "MONTH",
|
|
90
|
-
Year = "YEAR"
|
|
85
|
+
SELF_UNLOCKING_VERIFY_CODE = "SELF_UNLOCKING_VERIFY_CODE",
|
|
86
|
+
VERIFY_CODE = "VERIFY_CODE"
|
|
91
87
|
}
|
|
@@ -16,7 +16,6 @@ export declare const isAlipayBrowser: () => boolean | null;
|
|
|
16
16
|
export declare const isBaiduBrowser: () => boolean | null;
|
|
17
17
|
export declare const isWeComeBrowser: () => boolean;
|
|
18
18
|
export declare const isMobile: () => RegExpMatchArray | null;
|
|
19
|
-
export declare const isWebview: () =>
|
|
20
|
-
export declare const isLenovoNetdisk: () => boolean | null;
|
|
19
|
+
export declare const isWebview: () => RegExpMatchArray | null;
|
|
21
20
|
export declare const isSpecialBrowser: () => boolean;
|
|
22
21
|
export declare const getPhoneInLoginPageContext: () => any;
|
|
@@ -6,5 +6,4 @@ export interface InitGuardI18nOptions {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const fallbackLng: (code?: string) => string[];
|
|
8
8
|
export declare const initGuardI18n: (options: InitGuardI18nOptions, callback: React.Dispatch<React.SetStateAction<boolean>>) => Promise<void>;
|
|
9
|
-
export declare const resolvedLanguage: string;
|
|
10
9
|
export { i18n };
|
|
@@ -22,6 +22,8 @@ export declare enum ApiCode {
|
|
|
22
22
|
FLOW_SELECT_ACCOUNT = 2921,
|
|
23
23
|
TENANT_PORTAL = 1644,
|
|
24
24
|
SELECT_ACCOUNT_2_LOGIN = 2930,
|
|
25
|
-
RESET_ACCOUNT_NAME = 1108
|
|
25
|
+
RESET_ACCOUNT_NAME = 1108,
|
|
26
|
+
INVITE_EXPIRE = 4032,
|
|
27
|
+
INVITE_PAGE_EXPIRE = 4033
|
|
26
28
|
}
|
|
27
29
|
export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { React } from 'shim-react';
|
|
2
|
-
import { GuardMFAInitData, MFAConfig } from '../interface';
|
|
3
|
-
export interface BindNingtonMFATotpProps {
|
|
4
|
-
initData: GuardMFAInitData;
|
|
5
|
-
changeModule: any;
|
|
6
|
-
}
|
|
7
|
-
export declare const BindNingtonMFATotp: React.FC<BindNingtonMFATotpProps>;
|
|
8
|
-
export interface VerifyNingtonMFATotpProps {
|
|
9
|
-
mfaToken: string;
|
|
10
|
-
mfaLogin: any;
|
|
11
|
-
}
|
|
12
|
-
export declare const VerifyNingtonMFATotp: React.FC<VerifyNingtonMFATotpProps>;
|
|
13
|
-
export interface NingtonMFATotpProps {
|
|
14
|
-
changeModule: any;
|
|
15
|
-
config: MFAConfig;
|
|
16
|
-
initData: GuardMFAInitData;
|
|
17
|
-
mfaLogin: any;
|
|
18
|
-
}
|
|
19
|
-
export declare const NingtonMFATotp: React.FC<NingtonMFATotpProps>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { React } from 'shim-react';
|
|
2
|
-
interface BindPasskeyProps {
|
|
3
|
-
mfaToken: string;
|
|
4
|
-
mfaLogin: (code: any, data: any, message?: string) => void;
|
|
5
|
-
}
|
|
6
|
-
interface VerifyPasskeyProps {
|
|
7
|
-
mfaToken: string;
|
|
8
|
-
mfaLogin: (code: any, data: any, message?: string) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
|
|
11
|
-
passkeyEnabled: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare const MFAPasskey: React.FC<MFAPasskeyProps>;
|
|
14
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
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>;
|