@dynamic-labs/client 4.40.1 → 4.41.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/CHANGELOG.md +19 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +7 -7
- package/src/modules/mfaModule/mfaModule.cjs +4 -0
- package/src/modules/mfaModule/mfaModule.d.ts +10 -1
- package/src/modules/mfaModule/mfaModule.js +4 -0
- package/src/modules/userInterfaceModule/userInterfaceModule.cjs +3 -0
- package/src/modules/userInterfaceModule/userInterfaceModule.d.ts +11 -0
- package/src/modules/userInterfaceModule/userInterfaceModule.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.41.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.40.2...v4.41.0) (2025-10-29)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **react-native:** add MFA recovery methods ([#9788](https://github.com/dynamic-labs/dynamic-auth/issues/9788)) ([664e0d5](https://github.com/dynamic-labs/dynamic-auth/commit/664e0d5878530abc9e645c8801a87f3109cfd8f9))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* crypto.com link opening on mobile ([#9779](https://github.com/dynamic-labs/dynamic-auth/issues/9779)) ([3439ac9](https://github.com/dynamic-labs/dynamic-auth/commit/3439ac9e2610360c6204f6195433ae3e05e26c30))
|
|
13
|
+
|
|
14
|
+
### [4.40.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.40.1...v4.40.2) (2025-10-28)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* upgrade node to 20.20 in sanity-yarn-add-sdk job for compatibility ([#9743](https://github.com/dynamic-labs/dynamic-auth/issues/9743)) ([58d7e32](https://github.com/dynamic-labs/dynamic-auth/commit/58d7e32cd3965fba983c91c6345eae3bfe8dd1d5))
|
|
20
|
+
|
|
2
21
|
### [4.40.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.40.0...v4.40.1) (2025-10-24)
|
|
3
22
|
|
|
4
23
|
### Bug Fixes
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.41.0",
|
|
4
4
|
"description": "Core package for utilizing Dynamic's sdk",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@vue/reactivity": "^3.4.21",
|
|
22
22
|
"@dynamic-labs/sdk-api-core": "0.0.813",
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
24
|
-
"@dynamic-labs/locale": "4.
|
|
25
|
-
"@dynamic-labs/logger": "4.
|
|
26
|
-
"@dynamic-labs/message-transport": "4.
|
|
27
|
-
"@dynamic-labs/types": "4.
|
|
28
|
-
"@dynamic-labs/webview-messages": "4.
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.41.0",
|
|
24
|
+
"@dynamic-labs/locale": "4.41.0",
|
|
25
|
+
"@dynamic-labs/logger": "4.41.0",
|
|
26
|
+
"@dynamic-labs/message-transport": "4.41.0",
|
|
27
|
+
"@dynamic-labs/types": "4.41.0",
|
|
28
|
+
"@dynamic-labs/webview-messages": "4.41.0",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {}
|
|
@@ -12,10 +12,14 @@ const createMfaModule = (core) => {
|
|
|
12
12
|
authDevice: (...args) => requestChannel.request('authDevice', ...args),
|
|
13
13
|
authRecoveryCode: (...args) => requestChannel.request('authRecoveryCode', ...args),
|
|
14
14
|
authenticateDevice: (...args) => requestChannel.request('authenticateDevice', ...args),
|
|
15
|
+
authenticateRecoveryCode: (...args) => requestChannel.request('authenticateRecoveryCode', ...args),
|
|
15
16
|
completeAcknowledgement: (...args) => requestChannel.request('completeAcknowledgement', ...args),
|
|
16
17
|
deleteUserDevice: (...args) => requestChannel.request('deleteUserDevice', ...args),
|
|
18
|
+
getNewRecoveryCodes: (...args) => requestChannel.request('getNewRecoveryCodes', ...args),
|
|
17
19
|
getRecoveryCodes: (...args) => requestChannel.request('getRecoveryCodes', ...args),
|
|
18
20
|
getUserDevices: (...args) => requestChannel.request('getUserDevices', ...args),
|
|
21
|
+
isPendingRecoveryCodesAcknowledgment: (...args) => requestChannel.request('isPendingRecoveryCodesAcknowledgment', ...args),
|
|
22
|
+
isRequiredForAction: (...args) => requestChannel.request('isMfaRequiredForAction', ...args),
|
|
19
23
|
updateUserDevice: (...args) => requestChannel.request('updateUserDevice', ...args),
|
|
20
24
|
verifyDevice: (...args) => requestChannel.request('verifyDevice', ...args),
|
|
21
25
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateMfaToken, MFADevice, MFADeviceType } from '@dynamic-labs/sdk-api-core';
|
|
1
|
+
import { CreateMfaToken, MFAAction, MFADevice, MFADeviceType } from '@dynamic-labs/sdk-api-core';
|
|
2
2
|
import { Core } from '../../client/core';
|
|
3
3
|
export type MfaModule = {
|
|
4
4
|
authRecoveryCode: (code: string) => Promise<boolean>;
|
|
@@ -20,5 +20,14 @@ export type MfaModule = {
|
|
|
20
20
|
deviceId?: string;
|
|
21
21
|
createMfaToken?: CreateMfaToken;
|
|
22
22
|
}) => Promise<string | null>;
|
|
23
|
+
authenticateRecoveryCode: ({ code, createMfaToken, }: {
|
|
24
|
+
code: string;
|
|
25
|
+
createMfaToken?: CreateMfaToken;
|
|
26
|
+
}) => Promise<string | null>;
|
|
27
|
+
getNewRecoveryCodes: () => Promise<string[]>;
|
|
28
|
+
isPendingRecoveryCodesAcknowledgment: () => Promise<boolean>;
|
|
29
|
+
isRequiredForAction: ({ mfaAction, }: {
|
|
30
|
+
mfaAction: MFAAction;
|
|
31
|
+
}) => Promise<boolean>;
|
|
23
32
|
};
|
|
24
33
|
export declare const createMfaModule: (core: Core) => MfaModule;
|
|
@@ -8,10 +8,14 @@ const createMfaModule = (core) => {
|
|
|
8
8
|
authDevice: (...args) => requestChannel.request('authDevice', ...args),
|
|
9
9
|
authRecoveryCode: (...args) => requestChannel.request('authRecoveryCode', ...args),
|
|
10
10
|
authenticateDevice: (...args) => requestChannel.request('authenticateDevice', ...args),
|
|
11
|
+
authenticateRecoveryCode: (...args) => requestChannel.request('authenticateRecoveryCode', ...args),
|
|
11
12
|
completeAcknowledgement: (...args) => requestChannel.request('completeAcknowledgement', ...args),
|
|
12
13
|
deleteUserDevice: (...args) => requestChannel.request('deleteUserDevice', ...args),
|
|
14
|
+
getNewRecoveryCodes: (...args) => requestChannel.request('getNewRecoveryCodes', ...args),
|
|
13
15
|
getRecoveryCodes: (...args) => requestChannel.request('getRecoveryCodes', ...args),
|
|
14
16
|
getUserDevices: (...args) => requestChannel.request('getUserDevices', ...args),
|
|
17
|
+
isPendingRecoveryCodesAcknowledgment: (...args) => requestChannel.request('isPendingRecoveryCodesAcknowledgment', ...args),
|
|
18
|
+
isRequiredForAction: (...args) => requestChannel.request('isMfaRequiredForAction', ...args),
|
|
15
19
|
updateUserDevice: (...args) => requestChannel.request('updateUserDevice', ...args),
|
|
16
20
|
verifyDevice: (...args) => requestChannel.request('verifyDevice', ...args),
|
|
17
21
|
};
|
|
@@ -22,6 +22,9 @@ const createUserInterfaceModule = (core) => {
|
|
|
22
22
|
hide: () => userInterfaceRequestChannel.emit('hideFundingOptions'),
|
|
23
23
|
show: () => userInterfaceRequestChannel.emit('openFundingOptions'),
|
|
24
24
|
},
|
|
25
|
+
mfa: {
|
|
26
|
+
show: (params) => userInterfaceRequestChannel.request('promptMfaAuth', params),
|
|
27
|
+
},
|
|
25
28
|
updateUser: {
|
|
26
29
|
show: (params) => userInterfaceRequestChannel.request('updateUserWithModal', params),
|
|
27
30
|
},
|
|
@@ -70,6 +70,17 @@ type UserInterfaceModuleMethods = {
|
|
|
70
70
|
};
|
|
71
71
|
}) => Promise<UserFields>;
|
|
72
72
|
};
|
|
73
|
+
mfa: {
|
|
74
|
+
/**
|
|
75
|
+
* Prompts the user to authenticate with MFA.
|
|
76
|
+
*
|
|
77
|
+
* Resolves with the MFA token when the user completes authentication.
|
|
78
|
+
* Rejects if the user cancels or if the request fails.
|
|
79
|
+
*/
|
|
80
|
+
show: (params?: {
|
|
81
|
+
createMfaToken?: boolean;
|
|
82
|
+
}) => Promise<string | null>;
|
|
83
|
+
};
|
|
73
84
|
};
|
|
74
85
|
type PublicUserInterfaceModuleMessages = Pick<UserInterfaceModuleMessages, typeof userInterfaceEventNames[number]>;
|
|
75
86
|
export type UserInterfaceModule = PickedEventListeners<PublicUserInterfaceModuleMessages> & UserInterfaceModuleMethods;
|
|
@@ -18,6 +18,9 @@ const createUserInterfaceModule = (core) => {
|
|
|
18
18
|
hide: () => userInterfaceRequestChannel.emit('hideFundingOptions'),
|
|
19
19
|
show: () => userInterfaceRequestChannel.emit('openFundingOptions'),
|
|
20
20
|
},
|
|
21
|
+
mfa: {
|
|
22
|
+
show: (params) => userInterfaceRequestChannel.request('promptMfaAuth', params),
|
|
23
|
+
},
|
|
21
24
|
updateUser: {
|
|
22
25
|
show: (params) => userInterfaceRequestChannel.request('updateUserWithModal', params),
|
|
23
26
|
},
|