@dynamic-labs/sdk-react-core 4.66.0 → 4.67.1
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 +33 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +14 -14
- package/src/index.d.ts +1 -1
- package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.cjs +18 -0
- package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.d.ts +1 -0
- package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.js +14 -0
- package/src/lib/client/extension/functions/hasElevatedAccessToken/index.d.ts +1 -0
- package/src/lib/client/extension/index.d.ts +1 -0
- package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.cjs +31 -11
- package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.js +31 -11
- package/src/lib/context/DynamicContext/DynamicContext.cjs +20 -19
- package/src/lib/context/DynamicContext/DynamicContext.js +20 -19
- package/src/lib/context/DynamicContext/types/SettingsOverrides.d.ts +10 -0
- package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +1 -0
- package/src/lib/shared/utils/functions/chain/getChainIcon.js +2 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/values.cjs +2 -0
- package/src/lib/utils/constants/values.js +2 -0
- package/src/lib/utils/functions/compareChains/compareChains.cjs +1 -0
- package/src/lib/utils/functions/compareChains/compareChains.js +1 -0
- package/src/lib/utils/hooks/index.d.ts +1 -1
- package/src/lib/utils/hooks/useAuthenticatePasskeyMFA/useAuthenticatePasskeyMFA.d.ts +2 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +2 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +2 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +2 -1
- package/src/lib/utils/hooks/useMfa/useMfa.cjs +6 -3
- package/src/lib/utils/hooks/useMfa/useMfa.d.ts +5 -3
- package/src/lib/utils/hooks/useMfa/useMfa.js +6 -3
- package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.cjs +7 -2
- package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.d.ts +2 -1
- package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.js +7 -2
- package/src/lib/utils/hooks/usePromptMfaAuth/usePromptMfaAuth.cjs +14 -185
- package/src/lib/utils/hooks/usePromptMfaAuth/usePromptMfaAuth.d.ts +15 -3
- package/src/lib/utils/hooks/usePromptMfaAuth/usePromptMfaAuth.js +14 -185
- package/src/lib/utils/hooks/useStepUpAuthentication/index.d.ts +1 -1
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.cjs +283 -33
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.d.ts +45 -15
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.js +279 -29
- package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.cjs +3 -2
- package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.js +3 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs +10 -6
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js +11 -7
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +10 -9
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +10 -9
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +4 -3
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.d.ts +2 -0
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +4 -3
- package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +3 -1
- package/src/lib/views/MfaVerificationView/MfaVerificationView.d.ts +3 -2
- package/src/lib/views/MfaVerificationView/MfaVerificationView.js +3 -1
- package/src/lib/views/Passkey/ConfirmPasskeyView/ConfirmPasskeyView.cjs +2 -1
- package/src/lib/views/Passkey/ConfirmPasskeyView/ConfirmPasskeyView.d.ts +3 -1
- package/src/lib/views/Passkey/ConfirmPasskeyView/ConfirmPasskeyView.js +2 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +21 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +21 -1
- package/src/lib/views/WalletList/data.cjs +1 -0
- package/src/lib/views/WalletList/data.d.ts +1 -1
- package/src/lib/views/WalletList/data.js +1 -0
- package/src/lib/views/viewToComponentMap.d.ts +3 -2
|
@@ -10,6 +10,7 @@ const DEFAULT_NUMBER_OF_WALLETS_TO_SHOW = 10;
|
|
|
10
10
|
// https://www.iana.org/assignments/jwt/jwt.xhtml#claims
|
|
11
11
|
// https://github.com/jaredhanson/id-blockchain-claims-in-jwt/blob/main/draft.md
|
|
12
12
|
const ChainEnumToVerifiedCredentialName = {
|
|
13
|
+
ALEO: 'aleo',
|
|
13
14
|
ALGO: 'algorand',
|
|
14
15
|
BTC: 'bip122', // see: https://namespaces.chainagnostic.org/bip122/caip2
|
|
15
16
|
COSMOS: 'cosmos',
|
|
@@ -22,6 +23,7 @@ const ChainEnumToVerifiedCredentialName = {
|
|
|
22
23
|
TON: 'ton',
|
|
23
24
|
};
|
|
24
25
|
const VerifiedCredentialNameToChainEnum = {
|
|
26
|
+
aleo: sdkApiCore.ChainEnum.Aleo,
|
|
25
27
|
algorand: sdkApiCore.ChainEnum.Algo,
|
|
26
28
|
bip122: sdkApiCore.ChainEnum.Btc,
|
|
27
29
|
cosmos: sdkApiCore.ChainEnum.Cosmos,
|
|
@@ -6,6 +6,7 @@ const DEFAULT_NUMBER_OF_WALLETS_TO_SHOW = 10;
|
|
|
6
6
|
// https://www.iana.org/assignments/jwt/jwt.xhtml#claims
|
|
7
7
|
// https://github.com/jaredhanson/id-blockchain-claims-in-jwt/blob/main/draft.md
|
|
8
8
|
const ChainEnumToVerifiedCredentialName = {
|
|
9
|
+
ALEO: 'aleo',
|
|
9
10
|
ALGO: 'algorand',
|
|
10
11
|
BTC: 'bip122', // see: https://namespaces.chainagnostic.org/bip122/caip2
|
|
11
12
|
COSMOS: 'cosmos',
|
|
@@ -18,6 +19,7 @@ const ChainEnumToVerifiedCredentialName = {
|
|
|
18
19
|
TON: 'ton',
|
|
19
20
|
};
|
|
20
21
|
const VerifiedCredentialNameToChainEnum = {
|
|
22
|
+
aleo: ChainEnum.Aleo,
|
|
21
23
|
algorand: ChainEnum.Algo,
|
|
22
24
|
bip122: ChainEnum.Btc,
|
|
23
25
|
cosmos: ChainEnum.Cosmos,
|
|
@@ -109,4 +109,4 @@ export type { CheckWalletLockStateParams, UnlockWalletParams, UpdatePasswordPara
|
|
|
109
109
|
export { usePromptWalletUnlock } from './usePromptWalletUnlock';
|
|
110
110
|
export { useGetWalletPassword } from './useGetWalletPassword';
|
|
111
111
|
export { useStepUpAuthentication } from './useStepUpAuthentication';
|
|
112
|
-
export type { StepUpAuthenticationState, UseStepUpAuthenticationParams, UseStepUpAuthenticationReturn, VerifyOtpParams, VerifyWalletParams, } from './useStepUpAuthentication';
|
|
112
|
+
export type { IsStepUpRequiredParams, PromptMfaParams, StepUpAuthenticationState, UseStepUpAuthenticationParams, UseStepUpAuthenticationReturn, VerifyOtpParams, VerifyPasskeyMfaParams, VerifyRecoveryCodeParams, VerifyTotpMfaParams, VerifyWalletParams, } from './useStepUpAuthentication';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { CreateMfaToken } from '@dynamic-labs/sdk-api-core';
|
|
1
|
+
import { CreateMfaToken, TokenScope } from '@dynamic-labs/sdk-api-core';
|
|
2
2
|
type UseAuthenticatePasskeyMFAProps = {
|
|
3
3
|
createMfaToken?: CreateMfaToken;
|
|
4
4
|
relatedOriginRpId?: string;
|
|
5
|
+
requestedScopes?: TokenScope[];
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* Authenticate passkey for MFA
|
|
@@ -545,7 +545,7 @@ const useDynamicWaas = () => {
|
|
|
545
545
|
});
|
|
546
546
|
yield refresh();
|
|
547
547
|
});
|
|
548
|
-
const upgradeToDynamicWaas = React.useCallback((_j) => _tslib.__awaiter(void 0, [_j], void 0, function* ({ privateKey, wallet, }) {
|
|
548
|
+
const upgradeToDynamicWaas = React.useCallback((_j) => _tslib.__awaiter(void 0, [_j], void 0, function* ({ privateKey, wallet, password, }) {
|
|
549
549
|
isUpgrading.current = true;
|
|
550
550
|
if (!primaryWallet) {
|
|
551
551
|
throw new utils.DynamicError('Primary wallet not found');
|
|
@@ -568,6 +568,7 @@ const useDynamicWaas = () => {
|
|
|
568
568
|
yield walletConnector.importPrivateKey({
|
|
569
569
|
chainName,
|
|
570
570
|
legacyWalletId: normalizedWalletId,
|
|
571
|
+
password,
|
|
571
572
|
privateKey,
|
|
572
573
|
publicAddressCheck: wallet.address,
|
|
573
574
|
});
|
|
@@ -54,8 +54,9 @@ export declare const useDynamicWaas: () => {
|
|
|
54
54
|
needsSettingsProcessing: boolean;
|
|
55
55
|
processSignOnWalletSettings: () => Promise<void>;
|
|
56
56
|
shouldInitializeWaas: boolean;
|
|
57
|
-
upgradeToDynamicWaas: ({ privateKey, wallet, }: {
|
|
57
|
+
upgradeToDynamicWaas: ({ privateKey, wallet, password, }: {
|
|
58
58
|
privateKey: string;
|
|
59
59
|
wallet: Wallet<WalletConnectorCore.WalletConnector>;
|
|
60
|
+
password?: string;
|
|
60
61
|
}) => Promise<void>;
|
|
61
62
|
};
|
|
@@ -541,7 +541,7 @@ const useDynamicWaas = () => {
|
|
|
541
541
|
});
|
|
542
542
|
yield refresh();
|
|
543
543
|
});
|
|
544
|
-
const upgradeToDynamicWaas = useCallback((_j) => __awaiter(void 0, [_j], void 0, function* ({ privateKey, wallet, }) {
|
|
544
|
+
const upgradeToDynamicWaas = useCallback((_j) => __awaiter(void 0, [_j], void 0, function* ({ privateKey, wallet, password, }) {
|
|
545
545
|
isUpgrading.current = true;
|
|
546
546
|
if (!primaryWallet) {
|
|
547
547
|
throw new DynamicError('Primary wallet not found');
|
|
@@ -564,6 +564,7 @@ const useDynamicWaas = () => {
|
|
|
564
564
|
yield walletConnector.importPrivateKey({
|
|
565
565
|
chainName,
|
|
566
566
|
legacyWalletId: normalizedWalletId,
|
|
567
|
+
password,
|
|
567
568
|
privateKey,
|
|
568
569
|
publicAddressCheck: wallet.address,
|
|
569
570
|
});
|
|
@@ -35,7 +35,7 @@ var useUserAuth = require('../useUserAuth/useUserAuth.cjs');
|
|
|
35
35
|
|
|
36
36
|
const useMfa = () => {
|
|
37
37
|
const { completeAuth } = useUserAuth.useUserAuth({});
|
|
38
|
-
const handleMfaAuth = React.useCallback((_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ code, type, deviceId, createMfaToken, resultHandler, }) {
|
|
38
|
+
const handleMfaAuth = React.useCallback((_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ code, type, deviceId, createMfaToken, requestedScopes, resultHandler, }) {
|
|
39
39
|
let result;
|
|
40
40
|
yield completeAuth({
|
|
41
41
|
updateJwtFunction: () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -46,6 +46,7 @@ const useMfa = () => {
|
|
|
46
46
|
code,
|
|
47
47
|
createMfaTokenOptions: createMfaToken,
|
|
48
48
|
deviceId,
|
|
49
|
+
requestedScopes,
|
|
49
50
|
});
|
|
50
51
|
result = resultHandler(response);
|
|
51
52
|
return {
|
|
@@ -103,11 +104,12 @@ const useMfa = () => {
|
|
|
103
104
|
});
|
|
104
105
|
return isValid;
|
|
105
106
|
}), [handleMfaAuth]);
|
|
106
|
-
const authenticateDevice = React.useCallback((_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ code, type = sdkApiCore.MFADeviceType.Totp, deviceId, createMfaToken, }) {
|
|
107
|
+
const authenticateDevice = React.useCallback((_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ code, type = sdkApiCore.MFADeviceType.Totp, deviceId, createMfaToken, requestedScopes, }) {
|
|
107
108
|
return handleMfaAuth({
|
|
108
109
|
code,
|
|
109
110
|
createMfaToken,
|
|
110
111
|
deviceId,
|
|
112
|
+
requestedScopes,
|
|
111
113
|
resultHandler: (response) => response.mfaToken,
|
|
112
114
|
type,
|
|
113
115
|
});
|
|
@@ -140,13 +142,14 @@ const useMfa = () => {
|
|
|
140
142
|
});
|
|
141
143
|
return isValid;
|
|
142
144
|
}), [completeAuth]);
|
|
143
|
-
const authenticateRecoveryCode = React.useCallback((_c) => _tslib.__awaiter(void 0, [_c], void 0, function* ({ code, createMfaToken, }) {
|
|
145
|
+
const authenticateRecoveryCode = React.useCallback((_c) => _tslib.__awaiter(void 0, [_c], void 0, function* ({ code, createMfaToken, requestedScopes, }) {
|
|
144
146
|
let mfaToken = undefined;
|
|
145
147
|
yield completeAuth({
|
|
146
148
|
updateJwtFunction: () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
147
149
|
const response = yield client.authenticateMfaRecoveryCode({
|
|
148
150
|
code,
|
|
149
151
|
createMfaTokenOptions: createMfaToken,
|
|
152
|
+
requestedScopes,
|
|
150
153
|
});
|
|
151
154
|
if (!response) {
|
|
152
155
|
throw new Error('Failed to authenticate recovery code');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateMfaToken, MFADevice, MFADeviceType } from '@dynamic-labs/sdk-api-core';
|
|
1
|
+
import { CreateMfaToken, MFADevice, MFADeviceType, TokenScope } from '@dynamic-labs/sdk-api-core';
|
|
2
2
|
type UseMfaHookResult = {
|
|
3
3
|
/**
|
|
4
4
|
* Add a new device to the user's account.
|
|
@@ -22,19 +22,21 @@ type UseMfaHookResult = {
|
|
|
22
22
|
* Authenticates a recovery code and returns a single use MFA token
|
|
23
23
|
* if the authentication is successful and createMfaToken param is provided.
|
|
24
24
|
*/
|
|
25
|
-
authenticateRecoveryCode: ({ code, createMfaToken, }: {
|
|
25
|
+
authenticateRecoveryCode: ({ code, createMfaToken, requestedScopes, }: {
|
|
26
26
|
code: string;
|
|
27
27
|
createMfaToken?: CreateMfaToken;
|
|
28
|
+
requestedScopes?: TokenScope[];
|
|
28
29
|
}) => Promise<string | undefined>;
|
|
29
30
|
/**
|
|
30
31
|
* Authenticates a device and returns a single use MFA token
|
|
31
32
|
* if the authentication is successful and createMfaToken param is provided.
|
|
32
33
|
*/
|
|
33
|
-
authenticateDevice: ({ code, type, deviceId, createMfaToken, }: {
|
|
34
|
+
authenticateDevice: ({ code, type, deviceId, createMfaToken, requestedScopes, }: {
|
|
34
35
|
code: string;
|
|
35
36
|
type?: MFADeviceType;
|
|
36
37
|
deviceId?: string;
|
|
37
38
|
createMfaToken?: CreateMfaToken;
|
|
39
|
+
requestedScopes?: TokenScope[];
|
|
38
40
|
}) => Promise<string | undefined>;
|
|
39
41
|
completeAcknowledgement: () => Promise<void>;
|
|
40
42
|
/**
|
|
@@ -31,7 +31,7 @@ import { useUserAuth } from '../useUserAuth/useUserAuth.js';
|
|
|
31
31
|
|
|
32
32
|
const useMfa = () => {
|
|
33
33
|
const { completeAuth } = useUserAuth({});
|
|
34
|
-
const handleMfaAuth = useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ code, type, deviceId, createMfaToken, resultHandler, }) {
|
|
34
|
+
const handleMfaAuth = useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ code, type, deviceId, createMfaToken, requestedScopes, resultHandler, }) {
|
|
35
35
|
let result;
|
|
36
36
|
yield completeAuth({
|
|
37
37
|
updateJwtFunction: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -42,6 +42,7 @@ const useMfa = () => {
|
|
|
42
42
|
code,
|
|
43
43
|
createMfaTokenOptions: createMfaToken,
|
|
44
44
|
deviceId,
|
|
45
|
+
requestedScopes,
|
|
45
46
|
});
|
|
46
47
|
result = resultHandler(response);
|
|
47
48
|
return {
|
|
@@ -99,11 +100,12 @@ const useMfa = () => {
|
|
|
99
100
|
});
|
|
100
101
|
return isValid;
|
|
101
102
|
}), [handleMfaAuth]);
|
|
102
|
-
const authenticateDevice = useCallback((_b) => __awaiter(void 0, [_b], void 0, function* ({ code, type = MFADeviceType.Totp, deviceId, createMfaToken, }) {
|
|
103
|
+
const authenticateDevice = useCallback((_b) => __awaiter(void 0, [_b], void 0, function* ({ code, type = MFADeviceType.Totp, deviceId, createMfaToken, requestedScopes, }) {
|
|
103
104
|
return handleMfaAuth({
|
|
104
105
|
code,
|
|
105
106
|
createMfaToken,
|
|
106
107
|
deviceId,
|
|
108
|
+
requestedScopes,
|
|
107
109
|
resultHandler: (response) => response.mfaToken,
|
|
108
110
|
type,
|
|
109
111
|
});
|
|
@@ -136,13 +138,14 @@ const useMfa = () => {
|
|
|
136
138
|
});
|
|
137
139
|
return isValid;
|
|
138
140
|
}), [completeAuth]);
|
|
139
|
-
const authenticateRecoveryCode = useCallback((_c) => __awaiter(void 0, [_c], void 0, function* ({ code, createMfaToken, }) {
|
|
141
|
+
const authenticateRecoveryCode = useCallback((_c) => __awaiter(void 0, [_c], void 0, function* ({ code, createMfaToken, requestedScopes, }) {
|
|
140
142
|
let mfaToken = undefined;
|
|
141
143
|
yield completeAuth({
|
|
142
144
|
updateJwtFunction: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
143
145
|
const response = yield authenticateMfaRecoveryCode({
|
|
144
146
|
code,
|
|
145
147
|
createMfaTokenOptions: createMfaToken,
|
|
148
|
+
requestedScopes,
|
|
146
149
|
});
|
|
147
150
|
if (!response) {
|
|
148
151
|
throw new Error('Failed to authenticate recovery code');
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
|
|
8
|
-
const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNetworkOverrides, evmNetworksOverrides, solanaNetworksOverrides, tronNetworksOverrides, aptosNetworksOverrides, stellarNetworksOverrides, tonNetworksOverrides, bitcoinNetworksOverrides, }) => React.useMemo(() => {
|
|
9
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
8
|
+
const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, aleoNetworksOverrides, cosmosNetworkOverrides, evmNetworksOverrides, solanaNetworksOverrides, tronNetworksOverrides, aptosNetworksOverrides, stellarNetworksOverrides, tonNetworksOverrides, bitcoinNetworksOverrides, }) => React.useMemo(() => {
|
|
9
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
10
10
|
const networks = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.networks;
|
|
11
11
|
if (!networks)
|
|
12
12
|
return {};
|
|
@@ -21,6 +21,7 @@ const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNe
|
|
|
21
21
|
const aptos = networks.find((configurations) => configurations.chainName === 'aptos');
|
|
22
22
|
const ton = networks.find((configurations) => configurations.chainName === 'ton');
|
|
23
23
|
const bitcoin = networks.find((configurations) => configurations.chainName === 'bitcoin');
|
|
24
|
+
const aleo = networks.find((configurations) => configurations.chainName === 'aleo');
|
|
24
25
|
let cosmosNetworks = (_a = cosmos === null || cosmos === void 0 ? void 0 : cosmos.networks) === null || _a === void 0 ? void 0 : _a.map((net) => createNetwork(net, Number.parseInt));
|
|
25
26
|
cosmosNetworks = overrideNetworks(cosmosNetworkOverrides, cosmosNetworks);
|
|
26
27
|
let evmNetworks = (_b = evm === null || evm === void 0 ? void 0 : evm.networks) === null || _b === void 0 ? void 0 : _b.map((net) => createNetwork(net, Number.parseInt));
|
|
@@ -48,7 +49,10 @@ const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNe
|
|
|
48
49
|
stellarNetworks = overrideNetworks(stellarNetworksOverrides, stellarNetworks);
|
|
49
50
|
let bitcoinNetworks = (_l = bitcoin === null || bitcoin === void 0 ? void 0 : bitcoin.networks) === null || _l === void 0 ? void 0 : _l.map((net) => createNetwork(net, Number.parseInt));
|
|
50
51
|
bitcoinNetworks = overrideNetworks(bitcoinNetworksOverrides, bitcoinNetworks);
|
|
52
|
+
let aleoNetworks = (_m = aleo === null || aleo === void 0 ? void 0 : aleo.networks) === null || _m === void 0 ? void 0 : _m.map((net) => createNetwork(net));
|
|
53
|
+
aleoNetworks = overrideNetworks(aleoNetworksOverrides, aleoNetworks);
|
|
51
54
|
const networkConfigurations = {
|
|
55
|
+
aleo: aleoNetworks,
|
|
52
56
|
aptos: aptosNetworks,
|
|
53
57
|
bitcoin: bitcoinNetworks,
|
|
54
58
|
cosmos: cosmosNetworks,
|
|
@@ -64,6 +68,7 @@ const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNe
|
|
|
64
68
|
return networkConfigurations;
|
|
65
69
|
}, [
|
|
66
70
|
projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.networks,
|
|
71
|
+
aleoNetworksOverrides,
|
|
67
72
|
cosmosNetworkOverrides,
|
|
68
73
|
evmNetworksOverrides,
|
|
69
74
|
solanaNetworksOverrides,
|
|
@@ -2,6 +2,7 @@ import type { ProjectSettings } from '@dynamic-labs/sdk-api-core';
|
|
|
2
2
|
import type { NetworksOverrides } from '../../../context/DynamicContext';
|
|
3
3
|
type UseNetworkConfigurationsFromProjectSettingsProps = {
|
|
4
4
|
projectSettings: ProjectSettings | undefined;
|
|
5
|
+
aleoNetworksOverrides?: NetworksOverrides;
|
|
5
6
|
evmNetworksOverrides?: NetworksOverrides;
|
|
6
7
|
cosmosNetworkOverrides?: NetworksOverrides;
|
|
7
8
|
solanaNetworksOverrides?: NetworksOverrides;
|
|
@@ -11,5 +12,5 @@ type UseNetworkConfigurationsFromProjectSettingsProps = {
|
|
|
11
12
|
tonNetworksOverrides?: NetworksOverrides;
|
|
12
13
|
bitcoinNetworksOverrides?: NetworksOverrides;
|
|
13
14
|
};
|
|
14
|
-
export declare const useNetworkConfigurationsFromProjectSettings: ({ projectSettings, cosmosNetworkOverrides, evmNetworksOverrides, solanaNetworksOverrides, tronNetworksOverrides, aptosNetworksOverrides, stellarNetworksOverrides, tonNetworksOverrides, bitcoinNetworksOverrides, }: UseNetworkConfigurationsFromProjectSettingsProps) => {};
|
|
15
|
+
export declare const useNetworkConfigurationsFromProjectSettings: ({ projectSettings, aleoNetworksOverrides, cosmosNetworkOverrides, evmNetworksOverrides, solanaNetworksOverrides, tronNetworksOverrides, aptosNetworksOverrides, stellarNetworksOverrides, tonNetworksOverrides, bitcoinNetworksOverrides, }: UseNetworkConfigurationsFromProjectSettingsProps) => {};
|
|
15
16
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
|
|
4
|
-
const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNetworkOverrides, evmNetworksOverrides, solanaNetworksOverrides, tronNetworksOverrides, aptosNetworksOverrides, stellarNetworksOverrides, tonNetworksOverrides, bitcoinNetworksOverrides, }) => useMemo(() => {
|
|
5
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
4
|
+
const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, aleoNetworksOverrides, cosmosNetworkOverrides, evmNetworksOverrides, solanaNetworksOverrides, tronNetworksOverrides, aptosNetworksOverrides, stellarNetworksOverrides, tonNetworksOverrides, bitcoinNetworksOverrides, }) => useMemo(() => {
|
|
5
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
6
6
|
const networks = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.networks;
|
|
7
7
|
if (!networks)
|
|
8
8
|
return {};
|
|
@@ -17,6 +17,7 @@ const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNe
|
|
|
17
17
|
const aptos = networks.find((configurations) => configurations.chainName === 'aptos');
|
|
18
18
|
const ton = networks.find((configurations) => configurations.chainName === 'ton');
|
|
19
19
|
const bitcoin = networks.find((configurations) => configurations.chainName === 'bitcoin');
|
|
20
|
+
const aleo = networks.find((configurations) => configurations.chainName === 'aleo');
|
|
20
21
|
let cosmosNetworks = (_a = cosmos === null || cosmos === void 0 ? void 0 : cosmos.networks) === null || _a === void 0 ? void 0 : _a.map((net) => createNetwork(net, Number.parseInt));
|
|
21
22
|
cosmosNetworks = overrideNetworks(cosmosNetworkOverrides, cosmosNetworks);
|
|
22
23
|
let evmNetworks = (_b = evm === null || evm === void 0 ? void 0 : evm.networks) === null || _b === void 0 ? void 0 : _b.map((net) => createNetwork(net, Number.parseInt));
|
|
@@ -44,7 +45,10 @@ const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNe
|
|
|
44
45
|
stellarNetworks = overrideNetworks(stellarNetworksOverrides, stellarNetworks);
|
|
45
46
|
let bitcoinNetworks = (_l = bitcoin === null || bitcoin === void 0 ? void 0 : bitcoin.networks) === null || _l === void 0 ? void 0 : _l.map((net) => createNetwork(net, Number.parseInt));
|
|
46
47
|
bitcoinNetworks = overrideNetworks(bitcoinNetworksOverrides, bitcoinNetworks);
|
|
48
|
+
let aleoNetworks = (_m = aleo === null || aleo === void 0 ? void 0 : aleo.networks) === null || _m === void 0 ? void 0 : _m.map((net) => createNetwork(net));
|
|
49
|
+
aleoNetworks = overrideNetworks(aleoNetworksOverrides, aleoNetworks);
|
|
47
50
|
const networkConfigurations = {
|
|
51
|
+
aleo: aleoNetworks,
|
|
48
52
|
aptos: aptosNetworks,
|
|
49
53
|
bitcoin: bitcoinNetworks,
|
|
50
54
|
cosmos: cosmosNetworks,
|
|
@@ -60,6 +64,7 @@ const useNetworkConfigurationsFromProjectSettings = ({ projectSettings, cosmosNe
|
|
|
60
64
|
return networkConfigurations;
|
|
61
65
|
}, [
|
|
62
66
|
projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.networks,
|
|
67
|
+
aleoNetworksOverrides,
|
|
63
68
|
cosmosNetworkOverrides,
|
|
64
69
|
evmNetworksOverrides,
|
|
65
70
|
solanaNetworksOverrides,
|
|
@@ -3,193 +3,22 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
var React = require('react');
|
|
8
|
-
var client$1 = require('@dynamic-labs-sdk/client');
|
|
9
|
-
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
10
|
-
var utils = require('@dynamic-labs/utils');
|
|
11
|
-
var useGetUserMfaMethods = require('../useGetUserMfaMethods/useGetUserMfaMethods.cjs');
|
|
12
|
-
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
13
|
-
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
14
|
-
require('../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
15
|
-
require('@dynamic-labs/iconic');
|
|
16
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
17
|
-
require('react/jsx-runtime');
|
|
18
|
-
require('../../../shared/logger.cjs');
|
|
19
|
-
require('@dynamic-labs/wallet-book');
|
|
20
|
-
require('../../constants/colors.cjs');
|
|
21
|
-
require('../../constants/values.cjs');
|
|
22
|
-
require('../../../shared/consts/index.cjs');
|
|
23
|
-
var dynamicEvents = require('../../../events/dynamicEvents.cjs');
|
|
24
|
-
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
25
|
-
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
26
|
-
require('@dynamic-labs/multi-wallet');
|
|
27
|
-
require('react-international-phone');
|
|
28
|
-
require('../../../store/state/nonce/nonce.cjs');
|
|
29
|
-
require('@dynamic-labs-sdk/client/core');
|
|
30
|
-
var client = require('../../../client/client.cjs');
|
|
31
|
-
require('../../../config/ApiEndpoint.cjs');
|
|
32
|
-
require('@dynamic-labs/locale');
|
|
33
|
-
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
34
|
-
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
35
|
-
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
36
|
-
require('../../functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
|
|
37
|
-
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
38
|
-
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
39
|
-
require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
40
|
-
require('../../../store/state/authMode/authMode.cjs');
|
|
41
|
-
require('../../../context/VerificationContext/VerificationContext.cjs');
|
|
42
|
-
require('react-dom');
|
|
43
|
-
require('../../functions/compareChains/compareChains.cjs');
|
|
44
|
-
require('../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
|
|
45
|
-
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
46
|
-
require('../useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
47
|
-
require('bs58');
|
|
48
|
-
require('@dynamic-labs/types');
|
|
49
|
-
require('../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
50
|
-
require('../../../context/LoadingContext/LoadingContext.cjs');
|
|
51
|
-
require('../../../context/WalletContext/WalletContext.cjs');
|
|
52
|
-
require('../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
53
|
-
require('yup');
|
|
54
|
-
require('../../../context/MockContext/MockContext.cjs');
|
|
55
|
-
require('../../../views/CollectUserDataView/useFields.cjs');
|
|
56
|
-
require('../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
57
|
-
require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
58
|
-
require('@dynamic-labs/rpc-providers');
|
|
59
|
-
require('../../../store/state/walletOptions/walletOptions.cjs');
|
|
60
|
-
require('react-i18next');
|
|
61
|
-
require('../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
62
|
-
require('../../../components/Alert/Alert.cjs');
|
|
63
|
-
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
64
|
-
require('../../../components/IconButton/IconButton.cjs');
|
|
65
|
-
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
66
|
-
require('../../../components/Input/Input.cjs');
|
|
67
|
-
require('../../../components/IsBrowser/IsBrowser.cjs');
|
|
68
|
-
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
69
|
-
require('../../../components/OverlayCard/OverlayCard.cjs');
|
|
70
|
-
require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
71
|
-
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
72
|
-
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
73
|
-
require('../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
74
|
-
require('../../../components/Popper/Popper/Popper.cjs');
|
|
75
|
-
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
76
|
-
require('react-focus-lock');
|
|
77
|
-
require('qrcode');
|
|
78
|
-
require('formik');
|
|
79
|
-
require('../useSubdomainCheck/useSubdomainCheck.cjs');
|
|
80
|
-
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
81
|
-
require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
82
|
-
require('../useWalletBackup/useWalletBackup.cjs');
|
|
83
|
-
require('../useWalletBackup/types.cjs');
|
|
84
|
-
require('../useWalletBackup/cloudProviders.cjs');
|
|
85
|
-
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
86
|
-
require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
87
|
-
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
88
|
-
require('@hcaptcha/react-hcaptcha');
|
|
89
|
-
require('../../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
90
|
-
require('../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
91
|
-
require('../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
92
|
-
require('../../../context/FooterAnimationContext/index.cjs');
|
|
93
|
-
require('../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
|
|
94
|
-
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
95
|
-
require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
96
|
-
require('../../../store/state/sendBalances.cjs');
|
|
97
|
-
require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
98
|
-
require('../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
99
|
-
require('../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
100
|
-
require('../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
101
|
-
require('../../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs');
|
|
102
|
-
require('../../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs');
|
|
103
|
-
require('../../../../index.cjs');
|
|
104
|
-
require('../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
105
|
-
require('../../../store/state/tokenBalances.cjs');
|
|
106
|
-
require('../../../store/state/multichainBalances.cjs');
|
|
107
|
-
var useAuthenticatePasskeyMFA = require('../useAuthenticatePasskeyMFA/useAuthenticatePasskeyMFA.cjs');
|
|
108
|
-
require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
109
|
-
var useInternalDynamicContext = require('../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
|
|
6
|
+
var useStepUpAuthentication = require('../useStepUpAuthentication/useStepUpAuthentication.cjs');
|
|
110
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Opens the Dynamic MFA modal (passkey or TOTP) and resolves when the user completes MFA.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Use `useStepUpAuthentication().promptMfa()` instead. Step-up authentication
|
|
12
|
+
* is the generic category; MFA is one verification method. The `promptMfa` method on
|
|
13
|
+
* `useStepUpAuthentication` provides the same behavior. This hook will be removed in the
|
|
14
|
+
* next major version.
|
|
15
|
+
*
|
|
16
|
+
* @returns A function that opens the MFA flow and returns a promise resolving to the
|
|
17
|
+
* MFA token (or `undefined` when using `requestedScopes` — use `getElevatedAccessToken({ scope })` after completion).
|
|
18
|
+
*/
|
|
111
19
|
const usePromptMfaAuth = () => {
|
|
112
|
-
const {
|
|
113
|
-
|
|
114
|
-
const getUserMfaMethods = useGetUserMfaMethods.useGetUserMfaMethods();
|
|
115
|
-
const authenticatePasskeyMFA = useAuthenticatePasskeyMFA.useAuthenticatePasskeyMFA();
|
|
116
|
-
const dynamicClient = client.useDynamicClient();
|
|
117
|
-
const promptMfaAuth = React.useCallback((props) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
118
|
-
const methods = yield getUserMfaMethods();
|
|
119
|
-
const allMethods = [
|
|
120
|
-
...methods.passkeys.map((passkey) => (Object.assign(Object.assign({}, passkey), { type: sdkApiCore.MFADeviceType.Passkey }))),
|
|
121
|
-
...methods.devices.map((device) => (Object.assign(Object.assign({}, device), { type: sdkApiCore.MFADeviceType.Totp }))),
|
|
122
|
-
];
|
|
123
|
-
if (!methods.userHasVerifiedMfaMethods || allMethods.length === 0) {
|
|
124
|
-
setShowAuthFlow(true);
|
|
125
|
-
pushView('mfa-choose-device', {
|
|
126
|
-
createMfaToken: props === null || props === void 0 ? void 0 : props.createMfaToken,
|
|
127
|
-
});
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
const lastCreatedMethod = allMethods.reduce((a, b) => {
|
|
131
|
-
if (a.createdAt && b.createdAt) {
|
|
132
|
-
return a.createdAt >= b.createdAt ? a : b;
|
|
133
|
-
}
|
|
134
|
-
if (b.createdAt) {
|
|
135
|
-
return b;
|
|
136
|
-
}
|
|
137
|
-
return a;
|
|
138
|
-
});
|
|
139
|
-
switch (lastCreatedMethod.type) {
|
|
140
|
-
case sdkApiCore.MFADeviceType.Passkey: {
|
|
141
|
-
const createMfaTokenOptions = (props === null || props === void 0 ? void 0 : props.createMfaToken)
|
|
142
|
-
? { singleUse: true }
|
|
143
|
-
: undefined;
|
|
144
|
-
// we're calling authenticatePasskeyMFA here because we don't want
|
|
145
|
-
// it to be called twice by the usePromise in the confirmPasskey view
|
|
146
|
-
const authenticatePasskeyPromise = authenticatePasskeyMFA({
|
|
147
|
-
createMfaToken: createMfaTokenOptions,
|
|
148
|
-
});
|
|
149
|
-
setShowAuthFlow(true);
|
|
150
|
-
pushView('passkey-confirm', {
|
|
151
|
-
authenticatePasskeyPromise,
|
|
152
|
-
createMfaToken: props === null || props === void 0 ? void 0 : props.createMfaToken,
|
|
153
|
-
});
|
|
154
|
-
// Return the promise so callers can await MFA completion
|
|
155
|
-
return authenticatePasskeyPromise;
|
|
156
|
-
}
|
|
157
|
-
case sdkApiCore.MFADeviceType.Totp: {
|
|
158
|
-
if (dynamicClient === null || dynamicClient === void 0 ? void 0 : dynamicClient.mfaToken) {
|
|
159
|
-
return dynamicClient === null || dynamicClient === void 0 ? void 0 : dynamicClient.mfaToken;
|
|
160
|
-
}
|
|
161
|
-
// If the mfaToken is not present, we need to open the MFA UI and wait for it to be available
|
|
162
|
-
const deferred = new utils.DeferredPromise();
|
|
163
|
-
// Open the MFA UI if the mfaToken is not available yet
|
|
164
|
-
setShowAuthFlow(true);
|
|
165
|
-
pushView('mfa-verification', {
|
|
166
|
-
createMfaToken: props === null || props === void 0 ? void 0 : props.createMfaToken,
|
|
167
|
-
});
|
|
168
|
-
const mfaCompletionSuccessOff = client$1.onEvent({
|
|
169
|
-
event: 'mfaCompletionSuccess',
|
|
170
|
-
listener: ({ mfaToken }) => deferred.resolve(mfaToken),
|
|
171
|
-
}, dynamicClient);
|
|
172
|
-
// Reject the promise if the auth flow is closed
|
|
173
|
-
const onAuthFlowCloseHandler = () => deferred.reject(new Error('MFA view closed'));
|
|
174
|
-
dynamicEvents.dynamicEvents.on('authFlowClose', onAuthFlowCloseHandler);
|
|
175
|
-
// Cleanup the event listeners
|
|
176
|
-
deferred.promise.finally(() => {
|
|
177
|
-
mfaCompletionSuccessOff();
|
|
178
|
-
dynamicEvents.dynamicEvents.off('authFlowClose', onAuthFlowCloseHandler);
|
|
179
|
-
});
|
|
180
|
-
return deferred.promise;
|
|
181
|
-
}
|
|
182
|
-
default:
|
|
183
|
-
throw new Error('Error determining MFA method to use');
|
|
184
|
-
}
|
|
185
|
-
}), [
|
|
186
|
-
authenticatePasskeyMFA,
|
|
187
|
-
dynamicClient,
|
|
188
|
-
getUserMfaMethods,
|
|
189
|
-
pushView,
|
|
190
|
-
setShowAuthFlow,
|
|
191
|
-
]);
|
|
192
|
-
return promptMfaAuth;
|
|
20
|
+
const { promptMfa } = useStepUpAuthentication.useStepUpAuthentication();
|
|
21
|
+
return promptMfa;
|
|
193
22
|
};
|
|
194
23
|
|
|
195
24
|
exports.usePromptMfaAuth = usePromptMfaAuth;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { TokenScope } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
export type PromptMfaAuthProps = {
|
|
2
3
|
createMfaToken?: boolean;
|
|
4
|
+
requestedScopes?: TokenScope[];
|
|
3
5
|
};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Opens the Dynamic MFA modal (passkey or TOTP) and resolves when the user completes MFA.
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Use `useStepUpAuthentication().promptMfa()` instead. Step-up authentication
|
|
10
|
+
* is the generic category; MFA is one verification method. The `promptMfa` method on
|
|
11
|
+
* `useStepUpAuthentication` provides the same behavior. This hook will be removed in the
|
|
12
|
+
* next major version.
|
|
13
|
+
*
|
|
14
|
+
* @returns A function that opens the MFA flow and returns a promise resolving to the
|
|
15
|
+
* MFA token (or `undefined` when using `requestedScopes` — use `getElevatedAccessToken({ scope })` after completion).
|
|
16
|
+
*/
|
|
17
|
+
export declare const usePromptMfaAuth: () => (props?: import("../useStepUpAuthentication").PromptMfaParams | undefined) => Promise<string | undefined>;
|