@dynamic-labs/sdk-react-core 4.71.0 → 4.72.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 +15 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +13 -13
- package/src/lib/client/extension/functions/generateChainingSignature/generateChainingSignature.cjs +15 -0
- package/src/lib/client/extension/functions/generateChainingSignature/generateChainingSignature.d.ts +1 -0
- package/src/lib/client/extension/functions/generateChainingSignature/generateChainingSignature.js +11 -0
- package/src/lib/client/extension/functions/generateSessionKeys/generateSessionKeys.cjs +11 -0
- package/src/lib/client/extension/functions/generateSessionKeys/generateSessionKeys.d.ts +1 -0
- package/src/lib/client/extension/functions/generateSessionKeys/generateSessionKeys.js +7 -0
- package/src/lib/client/extension/functions/getClientSessionNonceHeaders/getClientSessionNonceHeaders.cjs +33 -0
- package/src/lib/client/extension/functions/getClientSessionNonceHeaders/getClientSessionNonceHeaders.d.ts +16 -0
- package/src/lib/client/extension/functions/getClientSessionNonceHeaders/getClientSessionNonceHeaders.js +29 -0
- package/src/lib/client/extension/functions/getSessionKeys/getSessionKeys.d.ts +1 -0
- package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.cjs +5 -9
- package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.d.ts +4 -0
- package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.js +6 -10
- package/src/lib/client/extension/functions/migrateClientSessionKey/migrateClientSessionKey.cjs +51 -0
- package/src/lib/client/extension/functions/migrateClientSessionKey/migrateClientSessionKey.d.ts +1 -0
- package/src/lib/client/extension/functions/migrateClientSessionKey/migrateClientSessionKey.js +47 -0
- package/src/lib/client/extension/hooks/useInitializeSdkClient/getApiHeaders/getApiHeaders.cjs +5 -6
- package/src/lib/client/extension/hooks/useInitializeSdkClient/getApiHeaders/getApiHeaders.js +5 -6
- package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.cjs +2 -0
- package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.js +2 -0
- package/src/lib/client/extension/index.d.ts +4 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +2 -2
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +2 -2
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.cjs +2 -2
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.js +2 -2
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +2 -2
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +2 -2
- package/src/lib/context/DynamicContext/DynamicContext.cjs +0 -3
- package/src/lib/context/DynamicContext/DynamicContext.js +0 -3
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +3 -4
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +3 -4
- package/src/lib/context/DynamicContext/types/DynamicContextProps.d.ts +10 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +0 -2
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +0 -2
- package/src/lib/data/api/api.cjs +1 -1
- package/src/lib/data/api/api.js +1 -1
- package/src/lib/data/api/embeddedWallets/embeddedWallets.cjs +2 -4
- package/src/lib/data/api/embeddedWallets/embeddedWallets.js +2 -4
- package/src/lib/store/state/dynamicContextProps/defaultDynamicSettings.cjs +2 -0
- package/src/lib/store/state/dynamicContextProps/defaultDynamicSettings.d.ts +3 -3
- package/src/lib/store/state/dynamicContextProps/defaultDynamicSettings.js +2 -0
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.cjs +0 -88
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.d.ts +0 -25
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.js +2 -83
- package/src/lib/utils/functions/index.d.ts +0 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +0 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +0 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +0 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +0 -2
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +0 -2
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +0 -2
- package/src/lib/utils/hooks/index.d.ts +0 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +4 -12
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +4 -12
- package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.cjs +1 -1
- package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.js +1 -1
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.cjs +2 -2
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.js +2 -2
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +2 -3
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +2 -3
- package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.cjs +14 -14
- package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.js +14 -14
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +3 -3
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +3 -3
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.cjs +14 -38
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.js +14 -38
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.types.d.ts +3 -2
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpPromptMfa.cjs +4 -1
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpPromptMfa.js +4 -1
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpPromptReauth.cjs +22 -6
- package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpPromptReauth.js +22 -6
- package/src/lib/utils/hooks/useSyncDeviceRegistrationFlow/useSyncDeviceRegistrationFlow.cjs +5 -1
- package/src/lib/utils/hooks/useSyncDeviceRegistrationFlow/useSyncDeviceRegistrationFlow.js +5 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +0 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +0 -2
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
- package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -2
- package/src/lib/views/EmailVerification/EmailVerification.js +2 -2
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +2 -2
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +2 -2
- package/src/lib/views/StepUpReauthOtpView/StepUpReauthOtpView.cjs +1 -109
- package/src/lib/views/StepUpReauthOtpView/StepUpReauthOtpView.js +1 -109
- package/src/lib/views/StepUpReauthSocialView/StepUpReauthSocialView.cjs +1 -2
- package/src/lib/views/StepUpReauthSocialView/StepUpReauthSocialView.js +1 -2
- package/src/lib/views/StepUpReauthWalletView/StepUpReauthWalletView.cjs +2 -96
- package/src/lib/views/StepUpReauthWalletView/StepUpReauthWalletView.js +2 -96
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +2 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +2 -2
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.cjs +60 -5
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.js +61 -6
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.cjs +12 -54
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.js +12 -54
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysMfaWidgetView/ManagePasskeysMfaWidgetView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysMfaWidgetView/ManagePasskeysMfaWidgetView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.js +2 -2
- package/src/lib/utils/functions/clientSessionKeys/constants.cjs +0 -8
- package/src/lib/utils/functions/clientSessionKeys/constants.js +0 -4
- package/src/lib/utils/hooks/useClientSessionKeys/index.d.ts +0 -1
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +0 -101
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.d.ts +0 -4
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +0 -97
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.72.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.71.0...v4.72.0) (2026-03-26)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add action-based MFA check to wallet export ([#10774](https://github.com/dynamic-labs/dynamic-auth/issues/10774)) ([06aae8a](https://github.com/dynamic-labs/dynamic-auth/commit/06aae8a6365adde1658b8632c8caa11df409c646))
|
|
8
|
+
* integrate checkStepUpAuth into React SDK ([#10751](https://github.com/dynamic-labs/dynamic-auth/issues/10751)) ([7907557](https://github.com/dynamic-labs/dynamic-auth/commit/79075575086b89b9bfb405d75e7c6b3d573cc25d))
|
|
9
|
+
* **react-native:** expose setup auth state ([#10779](https://github.com/dynamic-labs/dynamic-auth/issues/10779)) ([9600e46](https://github.com/dynamic-labs/dynamic-auth/commit/9600e46028b446c88e682e7d842e65d691230b14))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* allow for connectors to inject icons into bridge view ([#10752](https://github.com/dynamic-labs/dynamic-auth/issues/10752)) ([94b5c3e](https://github.com/dynamic-labs/dynamic-auth/commit/94b5c3e78a1d92558ef316d9ca6761fdc4b788d5))
|
|
15
|
+
* react-native-extension build on iOS ([#10764](https://github.com/dynamic-labs/dynamic-auth/issues/10764)) ([b5eca2a](https://github.com/dynamic-labs/dynamic-auth/commit/b5eca2aa012e3da74361e28b4a41414710fdfa9c))
|
|
16
|
+
|
|
2
17
|
## [4.71.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.70.0...v4.71.0) (2026-03-24)
|
|
3
18
|
|
|
4
19
|
|
package/package.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.
|
|
6
|
+
var version = "4.72.0";
|
|
7
7
|
var dependencies = {
|
|
8
8
|
"@dynamic-labs/sdk-api-core": "0.0.909",
|
|
9
|
-
"@dynamic-labs-sdk/client": "0.
|
|
9
|
+
"@dynamic-labs-sdk/client": "0.19.0",
|
|
10
10
|
"@dynamic-labs-wallet/browser-wallet-client": "0.0.314",
|
|
11
11
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
12
12
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
package/package.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.
|
|
2
|
+
var version = "4.72.0";
|
|
3
3
|
var dependencies = {
|
|
4
4
|
"@dynamic-labs/sdk-api-core": "0.0.909",
|
|
5
|
-
"@dynamic-labs-sdk/client": "0.
|
|
5
|
+
"@dynamic-labs-sdk/client": "0.19.0",
|
|
6
6
|
"@dynamic-labs-wallet/browser-wallet-client": "0.0.314",
|
|
7
7
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
8
8
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.72.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.909",
|
|
6
|
-
"@dynamic-labs-sdk/client": "0.
|
|
6
|
+
"@dynamic-labs-sdk/client": "0.19.0",
|
|
7
7
|
"@dynamic-labs-wallet/browser-wallet-client": "0.0.314",
|
|
8
8
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
9
9
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"yup": "0.32.11",
|
|
17
17
|
"react-international-phone": "4.5.0",
|
|
18
18
|
"bs58": "5.0.0",
|
|
19
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
20
|
-
"@dynamic-labs/iconic": "4.
|
|
21
|
-
"@dynamic-labs/locale": "4.
|
|
22
|
-
"@dynamic-labs/logger": "4.
|
|
23
|
-
"@dynamic-labs/multi-wallet": "4.
|
|
24
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
25
|
-
"@dynamic-labs/store": "4.
|
|
26
|
-
"@dynamic-labs/types": "4.
|
|
27
|
-
"@dynamic-labs/utils": "4.
|
|
28
|
-
"@dynamic-labs/wallet-book": "4.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
19
|
+
"@dynamic-labs/assert-package-version": "4.72.0",
|
|
20
|
+
"@dynamic-labs/iconic": "4.72.0",
|
|
21
|
+
"@dynamic-labs/locale": "4.72.0",
|
|
22
|
+
"@dynamic-labs/logger": "4.72.0",
|
|
23
|
+
"@dynamic-labs/multi-wallet": "4.72.0",
|
|
24
|
+
"@dynamic-labs/rpc-providers": "4.72.0",
|
|
25
|
+
"@dynamic-labs/store": "4.72.0",
|
|
26
|
+
"@dynamic-labs/types": "4.72.0",
|
|
27
|
+
"@dynamic-labs/utils": "4.72.0",
|
|
28
|
+
"@dynamic-labs/wallet-book": "4.72.0",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.72.0",
|
|
30
30
|
"eventemitter3": "5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
package/src/lib/client/extension/functions/generateChainingSignature/generateChainingSignature.cjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
7
|
+
var client = require('@dynamic-labs-sdk/client');
|
|
8
|
+
var core = require('@dynamic-labs-sdk/client/core');
|
|
9
|
+
|
|
10
|
+
const generateChainingSignature = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
11
|
+
const { signature } = yield core.getSignedSessionId(client.getDefaultClient());
|
|
12
|
+
return signature;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
exports.generateChainingSignature = generateChainingSignature;
|
package/src/lib/client/extension/functions/generateChainingSignature/generateChainingSignature.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateChainingSignature: () => Promise<string>;
|
package/src/lib/client/extension/functions/generateChainingSignature/generateChainingSignature.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
3
|
+
import { getDefaultClient } from '@dynamic-labs-sdk/client';
|
|
4
|
+
import { getSignedSessionId } from '@dynamic-labs-sdk/client/core';
|
|
5
|
+
|
|
6
|
+
const generateChainingSignature = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
+
const { signature } = yield getSignedSessionId(getDefaultClient());
|
|
8
|
+
return signature;
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { generateChainingSignature };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var client = require('@dynamic-labs-sdk/client');
|
|
7
|
+
var core = require('@dynamic-labs-sdk/client/core');
|
|
8
|
+
|
|
9
|
+
const generateSessionKeys = () => core.generateSessionKeys(client.getDefaultClient());
|
|
10
|
+
|
|
11
|
+
exports.generateSessionKeys = generateSessionKeys;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateSessionKeys: () => Promise<import("@dynamic-labs-sdk/client/core").SessionKeys>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { getDefaultClient } from '@dynamic-labs-sdk/client';
|
|
3
|
+
import { generateSessionKeys as generateSessionKeys$1 } from '@dynamic-labs-sdk/client/core';
|
|
4
|
+
|
|
5
|
+
const generateSessionKeys = () => generateSessionKeys$1(getDefaultClient());
|
|
6
|
+
|
|
7
|
+
export { generateSessionKeys };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
7
|
+
var client = require('@dynamic-labs-sdk/client');
|
|
8
|
+
var core = require('@dynamic-labs-sdk/client/core');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Returns the nonce, nonce signature, and session public key needed for
|
|
12
|
+
* Turnkey session key registration headers.
|
|
13
|
+
*
|
|
14
|
+
* Parses the combined session chaining signature format:
|
|
15
|
+
* `${signedSessionId}/${nonceSignature}/${nonce}`
|
|
16
|
+
*
|
|
17
|
+
* Note: signatures are hex-encoded (no slashes), so splitting on '/' is safe.
|
|
18
|
+
*/
|
|
19
|
+
const getClientSessionNonceHeaders = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const client$1 = client.getDefaultClient();
|
|
22
|
+
const { signature } = yield core.getSignedSessionId(client$1);
|
|
23
|
+
// signature format: "${signedSessionId}/${nonceSignature}/${nonce}"
|
|
24
|
+
const parts = signature.split('/');
|
|
25
|
+
if (parts.length < 3) {
|
|
26
|
+
throw new Error(`Unexpected session chaining signature format: expected 3 parts, got ${parts.length}`);
|
|
27
|
+
}
|
|
28
|
+
const [, nonceSignature, nonce] = parts;
|
|
29
|
+
const publicKey = (_b = (_a = core.getSessionKeys(client$1)) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : '';
|
|
30
|
+
return { nonce, nonceSignature, publicKey };
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
exports.getClientSessionNonceHeaders = getClientSessionNonceHeaders;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type ClientSessionNonceHeaders = {
|
|
2
|
+
nonce: string;
|
|
3
|
+
nonceSignature: string;
|
|
4
|
+
publicKey: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Returns the nonce, nonce signature, and session public key needed for
|
|
8
|
+
* Turnkey session key registration headers.
|
|
9
|
+
*
|
|
10
|
+
* Parses the combined session chaining signature format:
|
|
11
|
+
* `${signedSessionId}/${nonceSignature}/${nonce}`
|
|
12
|
+
*
|
|
13
|
+
* Note: signatures are hex-encoded (no slashes), so splitting on '/' is safe.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getClientSessionNonceHeaders: () => Promise<ClientSessionNonceHeaders>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
3
|
+
import { getDefaultClient } from '@dynamic-labs-sdk/client';
|
|
4
|
+
import { getSignedSessionId, getSessionKeys } from '@dynamic-labs-sdk/client/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Returns the nonce, nonce signature, and session public key needed for
|
|
8
|
+
* Turnkey session key registration headers.
|
|
9
|
+
*
|
|
10
|
+
* Parses the combined session chaining signature format:
|
|
11
|
+
* `${signedSessionId}/${nonceSignature}/${nonce}`
|
|
12
|
+
*
|
|
13
|
+
* Note: signatures are hex-encoded (no slashes), so splitting on '/' is safe.
|
|
14
|
+
*/
|
|
15
|
+
const getClientSessionNonceHeaders = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const client = getDefaultClient();
|
|
18
|
+
const { signature } = yield getSignedSessionId(client);
|
|
19
|
+
// signature format: "${signedSessionId}/${nonceSignature}/${nonce}"
|
|
20
|
+
const parts = signature.split('/');
|
|
21
|
+
if (parts.length < 3) {
|
|
22
|
+
throw new Error(`Unexpected session chaining signature format: expected 3 parts, got ${parts.length}`);
|
|
23
|
+
}
|
|
24
|
+
const [, nonceSignature, nonce] = parts;
|
|
25
|
+
const publicKey = (_b = (_a = getSessionKeys(client)) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : '';
|
|
26
|
+
return { nonce, nonceSignature, publicKey };
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export { getClientSessionNonceHeaders };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getSessionKeys: () => import("@dynamic-labs-sdk/client/core").SessionKeys | undefined;
|
package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.cjs
CHANGED
|
@@ -4,15 +4,11 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var client = require('@dynamic-labs-sdk/client');
|
|
7
|
-
var core = require('@dynamic-labs-sdk/client/core');
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return elevatedAccessTokens.some((token) => token.scopes.includes(scope) &&
|
|
15
|
-
(!token.expiresAt || token.expiresAt > threshold));
|
|
16
|
-
};
|
|
8
|
+
/**
|
|
9
|
+
* Checks whether a valid elevated access token exists for the given scope.
|
|
10
|
+
* Delegates to the JS SDK's getElevatedAccessToken without consuming the token.
|
|
11
|
+
*/
|
|
12
|
+
const hasElevatedAccessToken = (scope) => client.getElevatedAccessToken({ consume: false, scope }) !== undefined;
|
|
17
13
|
|
|
18
14
|
exports.hasElevatedAccessToken = hasElevatedAccessToken;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import {
|
|
3
|
-
import { getCore } from '@dynamic-labs-sdk/client/core';
|
|
2
|
+
import { getElevatedAccessToken } from '@dynamic-labs-sdk/client';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return elevatedAccessTokens.some((token) => token.scopes.includes(scope) &&
|
|
11
|
-
(!token.expiresAt || token.expiresAt > threshold));
|
|
12
|
-
};
|
|
4
|
+
/**
|
|
5
|
+
* Checks whether a valid elevated access token exists for the given scope.
|
|
6
|
+
* Delegates to the JS SDK's getElevatedAccessToken without consuming the token.
|
|
7
|
+
*/
|
|
8
|
+
const hasElevatedAccessToken = (scope) => getElevatedAccessToken({ consume: false, scope }) !== undefined;
|
|
13
9
|
|
|
14
10
|
export { hasElevatedAccessToken };
|
package/src/lib/client/extension/functions/migrateClientSessionKey/migrateClientSessionKey.cjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
7
|
+
var client = require('@dynamic-labs-sdk/client');
|
|
8
|
+
var core = require('@dynamic-labs-sdk/client/core');
|
|
9
|
+
require('@dynamic-labs/iconic');
|
|
10
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
11
|
+
require('react');
|
|
12
|
+
require('react/jsx-runtime');
|
|
13
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
var logger = require('../../../../shared/logger.cjs');
|
|
15
|
+
require('@dynamic-labs/wallet-book');
|
|
16
|
+
require('@dynamic-labs/utils');
|
|
17
|
+
require('../../../../utils/constants/colors.cjs');
|
|
18
|
+
require('../../../../utils/constants/values.cjs');
|
|
19
|
+
require('@dynamic-labs/sdk-api-core');
|
|
20
|
+
require('../../../../shared/consts/index.cjs');
|
|
21
|
+
var getClientSessionKeys = require('../../../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
22
|
+
|
|
23
|
+
const migrateClientSessionKey = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
try {
|
|
25
|
+
// Wait for the SDK to finish initializing (including its own migration phase)
|
|
26
|
+
// before overwriting the keychain — react-SDK keys always take precedence.
|
|
27
|
+
const client$1 = client.getDefaultClient();
|
|
28
|
+
yield client.waitForClientInitialized(client$1);
|
|
29
|
+
logger.logger.debug('[migrateClientSessionKey] Checking for legacy session key in storage');
|
|
30
|
+
const legacy = getClientSessionKeys.getClientSessionKeys();
|
|
31
|
+
if (!legacy) {
|
|
32
|
+
logger.logger.debug('[migrateClientSessionKey] No legacy session key found in storage, skipping migration');
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const { keychain } = core.getCore(client$1);
|
|
36
|
+
logger.logger.debug('[migrateClientSessionKey] Found legacy session key, importing into keychain', { expectedPublicKey: legacy.publicKey });
|
|
37
|
+
const importedPublicKey = yield keychain.importKey('session', legacy.privateKeyJwk);
|
|
38
|
+
logger.logger.debug('[migrateClientSessionKey] Key imported into IndexedDB', {
|
|
39
|
+
expectedPublicKey: legacy.publicKey,
|
|
40
|
+
importedPublicKey,
|
|
41
|
+
});
|
|
42
|
+
core.getCore(client$1).state.set({ sessionKeys: importedPublicKey });
|
|
43
|
+
getClientSessionKeys.clearClientSessionKeys();
|
|
44
|
+
logger.logger.debug('[migrateClientSessionKey] Migration complete, legacy entry removed from storage');
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
logger.logger.debug('[migrateClientSessionKey] Migration failed, ignoring:', error);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
exports.migrateClientSessionKey = migrateClientSessionKey;
|
package/src/lib/client/extension/functions/migrateClientSessionKey/migrateClientSessionKey.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const migrateClientSessionKey: () => Promise<void>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
3
|
+
import { getDefaultClient, waitForClientInitialized } from '@dynamic-labs-sdk/client';
|
|
4
|
+
import { getCore } from '@dynamic-labs-sdk/client/core';
|
|
5
|
+
import '@dynamic-labs/iconic';
|
|
6
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
7
|
+
import 'react';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
9
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import { logger } from '../../../../shared/logger.js';
|
|
11
|
+
import '@dynamic-labs/wallet-book';
|
|
12
|
+
import '@dynamic-labs/utils';
|
|
13
|
+
import '../../../../utils/constants/colors.js';
|
|
14
|
+
import '../../../../utils/constants/values.js';
|
|
15
|
+
import '@dynamic-labs/sdk-api-core';
|
|
16
|
+
import '../../../../shared/consts/index.js';
|
|
17
|
+
import { getClientSessionKeys, clearClientSessionKeys } from '../../../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
18
|
+
|
|
19
|
+
const migrateClientSessionKey = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
try {
|
|
21
|
+
// Wait for the SDK to finish initializing (including its own migration phase)
|
|
22
|
+
// before overwriting the keychain — react-SDK keys always take precedence.
|
|
23
|
+
const client = getDefaultClient();
|
|
24
|
+
yield waitForClientInitialized(client);
|
|
25
|
+
logger.debug('[migrateClientSessionKey] Checking for legacy session key in storage');
|
|
26
|
+
const legacy = getClientSessionKeys();
|
|
27
|
+
if (!legacy) {
|
|
28
|
+
logger.debug('[migrateClientSessionKey] No legacy session key found in storage, skipping migration');
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const { keychain } = getCore(client);
|
|
32
|
+
logger.debug('[migrateClientSessionKey] Found legacy session key, importing into keychain', { expectedPublicKey: legacy.publicKey });
|
|
33
|
+
const importedPublicKey = yield keychain.importKey('session', legacy.privateKeyJwk);
|
|
34
|
+
logger.debug('[migrateClientSessionKey] Key imported into IndexedDB', {
|
|
35
|
+
expectedPublicKey: legacy.publicKey,
|
|
36
|
+
importedPublicKey,
|
|
37
|
+
});
|
|
38
|
+
getCore(client).state.set({ sessionKeys: importedPublicKey });
|
|
39
|
+
clearClientSessionKeys();
|
|
40
|
+
logger.debug('[migrateClientSessionKey] Migration complete, legacy entry removed from storage');
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
logger.debug('[migrateClientSessionKey] Migration failed, ignoring:', error);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export { migrateClientSessionKey };
|
package/src/lib/client/extension/hooks/useInitializeSdkClient/getApiHeaders/getApiHeaders.cjs
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
+
var client = require('@dynamic-labs-sdk/client');
|
|
7
|
+
var core = require('@dynamic-labs-sdk/client/core');
|
|
6
8
|
var version = require('../../../../../../version.cjs');
|
|
7
9
|
var isGlobalWalletPopup = require('../../../../../shared/utils/functions/isGlobalWalletPopup/isGlobalWalletPopup.cjs');
|
|
8
10
|
require('@dynamic-labs/sdk-api-core');
|
|
@@ -23,16 +25,13 @@ require('../../../../../utils/constants/colors.cjs');
|
|
|
23
25
|
require('../../../../../shared/consts/index.cjs');
|
|
24
26
|
require('../../../../../store/state/nonce/nonce.cjs');
|
|
25
27
|
var randomString = require('../../../../../utils/functions/randomString/randomString.cjs');
|
|
26
|
-
require('@dynamic-labs-sdk/client/core');
|
|
27
28
|
require('../../../../client.cjs');
|
|
28
|
-
require('@dynamic-labs-sdk/client');
|
|
29
29
|
require('../../../../../config/ApiEndpoint.cjs');
|
|
30
30
|
require('../../../../../events/dynamicEvents.cjs');
|
|
31
31
|
require('@dynamic-labs/locale');
|
|
32
32
|
require('../../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
33
33
|
require('../../../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
34
34
|
require('../../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
35
|
-
var getClientSessionKeys = require('../../../../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
36
35
|
require('../../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
|
|
37
36
|
|
|
38
37
|
const getApiHeaders = () => {
|
|
@@ -43,9 +42,9 @@ const getApiHeaders = () => {
|
|
|
43
42
|
if (deviceFingerprint) {
|
|
44
43
|
apiHeaders['x-dyn-device-fingerprint'] = deviceFingerprint;
|
|
45
44
|
}
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
apiHeaders['x-dyn-session-public-key'] =
|
|
45
|
+
const sessionKeys = core.getSessionKeys(client.getDefaultClient());
|
|
46
|
+
if (sessionKeys === null || sessionKeys === void 0 ? void 0 : sessionKeys.publicKey) {
|
|
47
|
+
apiHeaders['x-dyn-session-public-key'] = sessionKeys.publicKey;
|
|
49
48
|
}
|
|
50
49
|
apiHeaders['x-dyn-version'] = `WalletKit/${version.VERSION}`;
|
|
51
50
|
apiHeaders['x-dyn-api-version'] = `API/${version.API_VERSION}`;
|
package/src/lib/client/extension/hooks/useInitializeSdkClient/getApiHeaders/getApiHeaders.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
|
+
import { getDefaultClient } from '@dynamic-labs-sdk/client';
|
|
3
|
+
import { getSessionKeys } from '@dynamic-labs-sdk/client/core';
|
|
2
4
|
import { VERSION, API_VERSION } from '../../../../../../version.js';
|
|
3
5
|
import { isGlobalWalletPopup } from '../../../../../shared/utils/functions/isGlobalWalletPopup/isGlobalWalletPopup.js';
|
|
4
6
|
import '@dynamic-labs/sdk-api-core';
|
|
@@ -19,16 +21,13 @@ import '../../../../../utils/constants/colors.js';
|
|
|
19
21
|
import '../../../../../shared/consts/index.js';
|
|
20
22
|
import '../../../../../store/state/nonce/nonce.js';
|
|
21
23
|
import { randomString } from '../../../../../utils/functions/randomString/randomString.js';
|
|
22
|
-
import '@dynamic-labs-sdk/client/core';
|
|
23
24
|
import '../../../../client.js';
|
|
24
|
-
import '@dynamic-labs-sdk/client';
|
|
25
25
|
import '../../../../../config/ApiEndpoint.js';
|
|
26
26
|
import '../../../../../events/dynamicEvents.js';
|
|
27
27
|
import '@dynamic-labs/locale';
|
|
28
28
|
import '../../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
29
29
|
import '../../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
30
30
|
import '../../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
31
|
-
import { getClientSessionPublicKey } from '../../../../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
32
31
|
import '../../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.js';
|
|
33
32
|
|
|
34
33
|
const getApiHeaders = () => {
|
|
@@ -39,9 +38,9 @@ const getApiHeaders = () => {
|
|
|
39
38
|
if (deviceFingerprint) {
|
|
40
39
|
apiHeaders['x-dyn-device-fingerprint'] = deviceFingerprint;
|
|
41
40
|
}
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
apiHeaders['x-dyn-session-public-key'] =
|
|
41
|
+
const sessionKeys = getSessionKeys(getDefaultClient());
|
|
42
|
+
if (sessionKeys === null || sessionKeys === void 0 ? void 0 : sessionKeys.publicKey) {
|
|
43
|
+
apiHeaders['x-dyn-session-public-key'] = sessionKeys.publicKey;
|
|
45
44
|
}
|
|
46
45
|
apiHeaders['x-dyn-version'] = `WalletKit/${VERSION}`;
|
|
47
46
|
apiHeaders['x-dyn-api-version'] = `API/${API_VERSION}`;
|
|
@@ -20,6 +20,7 @@ require('../../../../utils/constants/colors.cjs');
|
|
|
20
20
|
require('../../../../utils/constants/values.cjs');
|
|
21
21
|
require('@dynamic-labs/sdk-api-core');
|
|
22
22
|
require('../../../../shared/consts/index.cjs');
|
|
23
|
+
var migrateClientSessionKey = require('../../functions/migrateClientSessionKey/migrateClientSessionKey.cjs');
|
|
23
24
|
var getApiHeaders = require('./getApiHeaders/getApiHeaders.cjs');
|
|
24
25
|
var syncEvents = require('./syncEvents/syncEvents.cjs');
|
|
25
26
|
|
|
@@ -69,6 +70,7 @@ const useInitializeSdkClient = ({ settings, client: clientFromProps }, key) => {
|
|
|
69
70
|
logLevel: settings.logLevel === 'DEBUG' ? 'debug' : undefined,
|
|
70
71
|
});
|
|
71
72
|
setClient(client$2);
|
|
73
|
+
void migrateClientSessionKey.migrateClientSessionKey();
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
exports.useInitializeSdkClient = useInitializeSdkClient;
|
|
@@ -16,6 +16,7 @@ import '../../../../utils/constants/colors.js';
|
|
|
16
16
|
import '../../../../utils/constants/values.js';
|
|
17
17
|
import '@dynamic-labs/sdk-api-core';
|
|
18
18
|
import '../../../../shared/consts/index.js';
|
|
19
|
+
import { migrateClientSessionKey } from '../../functions/migrateClientSessionKey/migrateClientSessionKey.js';
|
|
19
20
|
import { getApiHeaders } from './getApiHeaders/getApiHeaders.js';
|
|
20
21
|
import { syncEvents } from './syncEvents/syncEvents.js';
|
|
21
22
|
|
|
@@ -65,6 +66,7 @@ const useInitializeSdkClient = ({ settings, client: clientFromProps }, key) => {
|
|
|
65
66
|
logLevel: settings.logLevel === 'DEBUG' ? 'debug' : undefined,
|
|
66
67
|
});
|
|
67
68
|
setClient(client);
|
|
69
|
+
void migrateClientSessionKey();
|
|
68
70
|
};
|
|
69
71
|
|
|
70
72
|
export { useInitializeSdkClient };
|
|
@@ -16,6 +16,10 @@ export { getSignInCredentialIdFromMinToken } from './functions/getSignInCredenti
|
|
|
16
16
|
export { getAuthToken } from './functions/getAuthToken';
|
|
17
17
|
export { getExpiresAt } from './functions/getExpiresAt';
|
|
18
18
|
export { hasElevatedAccessToken } from './functions/hasElevatedAccessToken';
|
|
19
|
+
export { generateChainingSignature } from './functions/generateChainingSignature/generateChainingSignature';
|
|
20
|
+
export { generateSessionKeys } from './functions/generateSessionKeys/generateSessionKeys';
|
|
21
|
+
export { getSessionKeys } from './functions/getSessionKeys/getSessionKeys';
|
|
22
|
+
export { getClientSessionNonceHeaders } from './functions/getClientSessionNonceHeaders/getClientSessionNonceHeaders';
|
|
19
23
|
export { useInitStatus } from './initStatus/useInitStatus';
|
|
20
24
|
export { setUnverifiedWalletAccounts } from './unverifiedWalletAccounts/setUnverifiedWalletAccounts';
|
|
21
25
|
export { createDeviceSignatureHeadersMiddleware } from './functions/createDeviceSignatureHeadersMiddleware';
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs
CHANGED
|
@@ -133,7 +133,7 @@ const UserProfileSocialAccount = ({ provider, }) => {
|
|
|
133
133
|
(connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.id) === (user === null || user === void 0 ? void 0 : user.lastVerifiedCredentialId);
|
|
134
134
|
const handleSocialAccountButton = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
135
135
|
if (isProviderLinked) {
|
|
136
|
-
if (isStepUpRequired({ scope: sdkApiCore.TokenScope.Credentialunlink })) {
|
|
136
|
+
if (yield isStepUpRequired({ scope: sdkApiCore.TokenScope.Credentialunlink })) {
|
|
137
137
|
try {
|
|
138
138
|
yield promptStepUpAuth({
|
|
139
139
|
requestedScopes: [sdkApiCore.TokenScope.Credentialunlink],
|
|
@@ -146,7 +146,7 @@ const UserProfileSocialAccount = ({ provider, }) => {
|
|
|
146
146
|
unlinkSocialAccount(provider);
|
|
147
147
|
}
|
|
148
148
|
else {
|
|
149
|
-
if (isStepUpRequired({ scope: sdkApiCore.TokenScope.Credentiallink })) {
|
|
149
|
+
if (yield isStepUpRequired({ scope: sdkApiCore.TokenScope.Credentiallink })) {
|
|
150
150
|
try {
|
|
151
151
|
yield promptStepUpAuth({
|
|
152
152
|
requestedScopes: [sdkApiCore.TokenScope.Credentiallink],
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js
CHANGED
|
@@ -129,7 +129,7 @@ const UserProfileSocialAccount = ({ provider, }) => {
|
|
|
129
129
|
(connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.id) === (user === null || user === void 0 ? void 0 : user.lastVerifiedCredentialId);
|
|
130
130
|
const handleSocialAccountButton = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
131
131
|
if (isProviderLinked) {
|
|
132
|
-
if (isStepUpRequired({ scope: TokenScope.Credentialunlink })) {
|
|
132
|
+
if (yield isStepUpRequired({ scope: TokenScope.Credentialunlink })) {
|
|
133
133
|
try {
|
|
134
134
|
yield promptStepUpAuth({
|
|
135
135
|
requestedScopes: [TokenScope.Credentialunlink],
|
|
@@ -142,7 +142,7 @@ const UserProfileSocialAccount = ({ provider, }) => {
|
|
|
142
142
|
unlinkSocialAccount(provider);
|
|
143
143
|
}
|
|
144
144
|
else {
|
|
145
|
-
if (isStepUpRequired({ scope: TokenScope.Credentiallink })) {
|
|
145
|
+
if (yield isStepUpRequired({ scope: TokenScope.Credentiallink })) {
|
|
146
146
|
try {
|
|
147
147
|
yield promptStepUpAuth({
|
|
148
148
|
requestedScopes: [TokenScope.Credentiallink],
|
|
@@ -28,10 +28,10 @@ require('@dynamic-labs/locale');
|
|
|
28
28
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
29
29
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
30
30
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
31
|
-
var getClientSessionKeys = require('../../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
32
31
|
require('../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
|
|
33
32
|
require('../../../events/dynamicEvents.cjs');
|
|
34
33
|
var storeTokenAndUser = require('../../../client/extension/storeTokenAndUser/storeTokenAndUser.cjs');
|
|
34
|
+
var generateSessionKeys = require('../../../client/extension/functions/generateSessionKeys/generateSessionKeys.cjs');
|
|
35
35
|
|
|
36
36
|
const createEmailHandler = (environmentId, { shouldRegisterSessionKeysOnSignin, generateSessionKey, }) => (email$1, captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
37
37
|
const createEmailVerificationResponse = yield email.createEmailVerification({
|
|
@@ -57,7 +57,7 @@ const createEmailHandler = (environmentId, { shouldRegisterSessionKeysOnSignin,
|
|
|
57
57
|
const keypair = yield generateSessionKey();
|
|
58
58
|
sessionPublicKey = keypair.publicKey;
|
|
59
59
|
}
|
|
60
|
-
yield
|
|
60
|
+
yield generateSessionKeys.generateSessionKeys();
|
|
61
61
|
const response = yield email.signInWithEmailVerification({
|
|
62
62
|
captchaToken,
|
|
63
63
|
environmentId,
|
|
@@ -24,10 +24,10 @@ import '@dynamic-labs/locale';
|
|
|
24
24
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
25
25
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
26
26
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
27
|
-
import { generateClientSessionKeys } from '../../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
28
27
|
import '../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.js';
|
|
29
28
|
import '../../../events/dynamicEvents.js';
|
|
30
29
|
import { storeTokenAndUser } from '../../../client/extension/storeTokenAndUser/storeTokenAndUser.js';
|
|
30
|
+
import { generateSessionKeys } from '../../../client/extension/functions/generateSessionKeys/generateSessionKeys.js';
|
|
31
31
|
|
|
32
32
|
const createEmailHandler = (environmentId, { shouldRegisterSessionKeysOnSignin, generateSessionKey, }) => (email, captchaToken) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
33
|
const createEmailVerificationResponse = yield createEmailVerification({
|
|
@@ -53,7 +53,7 @@ const createEmailHandler = (environmentId, { shouldRegisterSessionKeysOnSignin,
|
|
|
53
53
|
const keypair = yield generateSessionKey();
|
|
54
54
|
sessionPublicKey = keypair.publicKey;
|
|
55
55
|
}
|
|
56
|
-
yield
|
|
56
|
+
yield generateSessionKeys();
|
|
57
57
|
const response = yield signInWithEmailVerification({
|
|
58
58
|
captchaToken,
|
|
59
59
|
environmentId,
|
|
@@ -27,10 +27,10 @@ var sms = require('../../../data/api/sms/sms.cjs');
|
|
|
27
27
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
28
28
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
29
29
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
30
|
-
var getClientSessionKeys = require('../../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
31
30
|
require('../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
|
|
32
31
|
require('../../../events/dynamicEvents.cjs');
|
|
33
32
|
var storeTokenAndUser = require('../../../client/extension/storeTokenAndUser/storeTokenAndUser.cjs');
|
|
33
|
+
var generateSessionKeys = require('../../../client/extension/functions/generateSessionKeys/generateSessionKeys.cjs');
|
|
34
34
|
|
|
35
35
|
const createSmsHandler = (environmentId, { shouldRegisterSessionKeysOnSignin, generateSessionKey, }) => (phone, captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
36
36
|
const { verificationUUID } = yield sms.createSmsVerification({
|
|
@@ -48,7 +48,7 @@ const createSmsHandler = (environmentId, { shouldRegisterSessionKeysOnSignin, ge
|
|
|
48
48
|
const keypair = yield generateSessionKey();
|
|
49
49
|
sessionPublicKey = keypair.publicKey;
|
|
50
50
|
}
|
|
51
|
-
yield
|
|
51
|
+
yield generateSessionKeys.generateSessionKeys();
|
|
52
52
|
const response = yield sms.signInWithSmsVerification({
|
|
53
53
|
captchaToken,
|
|
54
54
|
environmentId,
|