@dynamic-labs/sdk-react-core 3.0.0-alpha.37 → 3.0.0-alpha.38
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 +12 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/components/EmailForm/EmailForm.cjs +1 -1
- package/src/lib/components/EmailForm/EmailForm.js +1 -1
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +1 -1
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +1 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +2 -1
- package/src/lib/components/UserProfile/UserProfile.js +2 -1
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.cjs +112 -0
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.d.ts +2 -0
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.js +108 -0
- package/src/lib/components/UserProfile/parts/EditProfileButton/index.d.ts +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.d.ts +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +2 -2
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -1
- package/src/lib/components/index.d.ts +1 -1
- package/src/lib/context/CaptchaContext/CaptchaContext.cjs +22 -12
- package/src/lib/context/CaptchaContext/CaptchaContext.d.ts +1 -4
- package/src/lib/context/CaptchaContext/CaptchaContext.js +23 -12
- package/src/lib/data/api/mfa/mfa.cjs +2 -1
- package/src/lib/data/api/mfa/mfa.d.ts +2 -1
- package/src/lib/data/api/mfa/mfa.js +2 -1
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +41 -3
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +42 -4
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -1
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -1
- package/src/lib/locale/en/translation.cjs +23 -7
- package/src/lib/locale/en/translation.d.ts +21 -5
- package/src/lib/locale/en/translation.js +23 -7
- package/src/lib/shared/assets/currency.cjs +70 -0
- package/src/lib/shared/assets/currency.js +46 -0
- package/src/lib/shared/assets/index.d.ts +7 -0
- package/src/lib/shared/assets/profile-outline.cjs +54 -0
- package/src/lib/shared/assets/profile-outline.js +30 -0
- package/src/lib/shared/assets/profile.cjs +65 -0
- package/src/lib/shared/assets/profile.js +41 -0
- package/src/lib/shared/assets/settings-outline.cjs +54 -0
- package/src/lib/shared/assets/settings-outline.js +30 -0
- package/src/lib/shared/assets/settings.cjs +54 -0
- package/src/lib/shared/assets/settings.js +30 -0
- package/src/lib/shared/assets/wallet-outline-v2.cjs +54 -0
- package/src/lib/shared/assets/wallet-outline-v2.js +30 -0
- package/src/lib/shared/assets/wallet.cjs +52 -0
- package/src/lib/shared/assets/wallet.js +28 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/localStorage.cjs +2 -0
- package/src/lib/utils/constants/localStorage.d.ts +1 -0
- package/src/lib/utils/constants/localStorage.js +2 -1
- package/src/lib/utils/hooks/useMfa/useMfa.cjs +2 -1
- package/src/lib/utils/hooks/useMfa/useMfa.d.ts +1 -1
- package/src/lib/utils/hooks/useMfa/useMfa.js +2 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +2 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +2 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +2 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +2 -1
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +1 -1
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +1 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.cjs +1 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.js +1 -1
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.cjs +1 -1
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.js +1 -1
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +1 -1
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +1 -1
- package/src/lib/views/EnterPasswordView/EnterPasswordView.cjs +1 -1
- package/src/lib/views/EnterPasswordView/EnterPasswordView.js +1 -1
- package/src/lib/views/FarcasterQrCodeView/FarcasterQrCodeView.cjs +0 -3
- package/src/lib/views/FarcasterQrCodeView/FarcasterQrCodeView.js +0 -3
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +1 -1
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +1 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +2 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +2 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +1 -2
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +1 -2
- package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.cjs +1 -1
- package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.js +1 -1
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +1 -1
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +1 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +1 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +1 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +1 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +1 -1
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.cjs +1 -1
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.js +1 -1
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +2 -2
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +2 -2
- package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +15 -15
- package/src/lib/views/MfaVerificationView/MfaVerificationView.d.ts +2 -1
- package/src/lib/views/MfaVerificationView/MfaVerificationView.js +15 -15
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
- package/src/lib/views/NoAccess/NoAccess.js +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +1 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -1
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +1 -1
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
- package/src/lib/views/viewToComponentMap.d.ts +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.cjs +16 -0
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.d.ts +13 -0
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js +12 -0
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +23 -45
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +24 -46
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +13 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +13 -2
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +11 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +11 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +4 -3
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -105
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +2 -106
- package/src/lib/widgets/DynamicWidget/views/{WalletSettingsView/WalletSettingsView.cjs → SettingsView/SettingsView.cjs} +34 -26
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/{WalletSettingsView/WalletSettingsView.js → SettingsView/SettingsView.js} +35 -27
- package/src/lib/widgets/DynamicWidget/views/SettingsView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +2 -15
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +2 -15
- package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.d.ts +0 -2
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/index.d.ts +0 -1
|
@@ -20,6 +20,7 @@ const WAGMI_LAST_SESSION_SETTINGS = 'dynamic_wagmi_session_settings';
|
|
|
20
20
|
const EMBEDDED_WALLET_SESSION_SETTINGS = 'dynamic_embedded_wallet_session_settings';
|
|
21
21
|
const EMBEDDED_WALLET_SECURE_BANNER = 'dynamic_embedded_secure_banner';
|
|
22
22
|
const PHONE_INPUT_DEFAULT_COUNTRY = 'dynamic_phone_input_default_country';
|
|
23
|
+
const CAPTCHA_TOKEN = 'dynamic_captcha_token';
|
|
23
24
|
/**
|
|
24
25
|
* Used to identify the purpose of a signature after phantom redirects back to the app in mobile
|
|
25
26
|
*/
|
|
@@ -31,6 +32,7 @@ exports.AUTH_MIN_TOKEN = AUTH_MIN_TOKEN;
|
|
|
31
32
|
exports.AUTH_MODE = AUTH_MODE;
|
|
32
33
|
exports.AUTH_TOKEN = AUTH_TOKEN;
|
|
33
34
|
exports.BRIDGE_ONBOARDING_COMPLETED = BRIDGE_ONBOARDING_COMPLETED;
|
|
35
|
+
exports.CAPTCHA_TOKEN = CAPTCHA_TOKEN;
|
|
34
36
|
exports.CONNECTED_WALLETS_INFO = CONNECTED_WALLETS_INFO;
|
|
35
37
|
exports.CONNECTED_WALLET_NAME_SERVICE = CONNECTED_WALLET_NAME_SERVICE;
|
|
36
38
|
exports.DYNAMIC_CONTEXT_LAST_SESSION_SETTINGS = DYNAMIC_CONTEXT_LAST_SESSION_SETTINGS;
|
|
@@ -17,6 +17,7 @@ export declare const WAGMI_LAST_SESSION_SETTINGS = "dynamic_wagmi_session_settin
|
|
|
17
17
|
export declare const EMBEDDED_WALLET_SESSION_SETTINGS = "dynamic_embedded_wallet_session_settings";
|
|
18
18
|
export declare const EMBEDDED_WALLET_SECURE_BANNER = "dynamic_embedded_secure_banner";
|
|
19
19
|
export declare const PHONE_INPUT_DEFAULT_COUNTRY = "dynamic_phone_input_default_country";
|
|
20
|
+
export declare const CAPTCHA_TOKEN = "dynamic_captcha_token";
|
|
20
21
|
export type PhantomSignatureState = {
|
|
21
22
|
/**
|
|
22
23
|
* Whether the user has agreed to transfer a wallet even if that means
|
|
@@ -16,10 +16,11 @@ const WAGMI_LAST_SESSION_SETTINGS = 'dynamic_wagmi_session_settings';
|
|
|
16
16
|
const EMBEDDED_WALLET_SESSION_SETTINGS = 'dynamic_embedded_wallet_session_settings';
|
|
17
17
|
const EMBEDDED_WALLET_SECURE_BANNER = 'dynamic_embedded_secure_banner';
|
|
18
18
|
const PHONE_INPUT_DEFAULT_COUNTRY = 'dynamic_phone_input_default_country';
|
|
19
|
+
const CAPTCHA_TOKEN = 'dynamic_captcha_token';
|
|
19
20
|
/**
|
|
20
21
|
* Used to identify the purpose of a signature after phantom redirects back to the app in mobile
|
|
21
22
|
*/
|
|
22
23
|
const PHANTOM_SIGNATURE_STATE = 'phantom_verification_type';
|
|
23
24
|
const STORE_STORAGE_KEY = 'dynamic_store';
|
|
24
25
|
|
|
25
|
-
export { AUTH_EXPIRES_AT, AUTH_MIN_TOKEN, AUTH_MODE, AUTH_TOKEN, BRIDGE_ONBOARDING_COMPLETED, CONNECTED_WALLETS_INFO, CONNECTED_WALLET_NAME_SERVICE, DYNAMIC_CONTEXT_LAST_SESSION_SETTINGS, EMBEDDED_WALLET_SECURE_BANNER, EMBEDDED_WALLET_SESSION_SETTINGS, LAST_USED_WALLET, NEWTOWEB3_WALLET_EXTENSION_FLAG_KEY, NONCE_STORAGE_KEY, PHANTOM_SIGNATURE_STATE, PHONE_INPUT_DEFAULT_COUNTRY, PRIMARY_WALLET_ID, STORE_STORAGE_KEY, WAGMI_LAST_SESSION_SETTINGS, WALLET_PICKER_SEARCH_KEY };
|
|
26
|
+
export { AUTH_EXPIRES_AT, AUTH_MIN_TOKEN, AUTH_MODE, AUTH_TOKEN, BRIDGE_ONBOARDING_COMPLETED, CAPTCHA_TOKEN, CONNECTED_WALLETS_INFO, CONNECTED_WALLET_NAME_SERVICE, DYNAMIC_CONTEXT_LAST_SESSION_SETTINGS, EMBEDDED_WALLET_SECURE_BANNER, EMBEDDED_WALLET_SESSION_SETTINGS, LAST_USED_WALLET, NEWTOWEB3_WALLET_EXTENSION_FLAG_KEY, NONCE_STORAGE_KEY, PHANTOM_SIGNATURE_STATE, PHONE_INPUT_DEFAULT_COUNTRY, PRIMARY_WALLET_ID, STORE_STORAGE_KEY, WAGMI_LAST_SESSION_SETTINGS, WALLET_PICKER_SEARCH_KEY };
|
|
@@ -130,7 +130,7 @@ const useMfa = () => {
|
|
|
130
130
|
});
|
|
131
131
|
return { id, secret, uri };
|
|
132
132
|
});
|
|
133
|
-
const authDevice = (code_1, ...args_2) => _tslib.__awaiter(void 0, [code_1, ...args_2], void 0, function* (code, type = sdkApiCore.MFADeviceType.Totp) {
|
|
133
|
+
const authDevice = (code_1, ...args_2) => _tslib.__awaiter(void 0, [code_1, ...args_2], void 0, function* (code, type = sdkApiCore.MFADeviceType.Totp, deviceId) {
|
|
134
134
|
try {
|
|
135
135
|
if (!verifiedUser) {
|
|
136
136
|
throw new Error(errors.USER_NOT_LOGGED_IN);
|
|
@@ -146,6 +146,7 @@ const useMfa = () => {
|
|
|
146
146
|
createMfaToken: {
|
|
147
147
|
singleUse: true,
|
|
148
148
|
},
|
|
149
|
+
deviceId,
|
|
149
150
|
environmentId,
|
|
150
151
|
type,
|
|
151
152
|
});
|
|
@@ -5,7 +5,7 @@ export declare const useMfa: () => {
|
|
|
5
5
|
secret: string;
|
|
6
6
|
uri: string;
|
|
7
7
|
}>;
|
|
8
|
-
readonly authDevice: (code: string, type?: MFADeviceType) => Promise<boolean>;
|
|
8
|
+
readonly authDevice: (code: string, type?: MFADeviceType, deviceId?: string) => Promise<boolean>;
|
|
9
9
|
readonly authRecoveryCode: (code: string) => Promise<boolean>;
|
|
10
10
|
readonly deleteUserDevice: (deviceId: string) => Promise<void>;
|
|
11
11
|
readonly getRecoveryCodes: (generateNewCodes?: boolean) => Promise<string[]>;
|
|
@@ -126,7 +126,7 @@ const useMfa = () => {
|
|
|
126
126
|
});
|
|
127
127
|
return { id, secret, uri };
|
|
128
128
|
});
|
|
129
|
-
const authDevice = (code_1, ...args_2) => __awaiter(void 0, [code_1, ...args_2], void 0, function* (code, type = MFADeviceType.Totp) {
|
|
129
|
+
const authDevice = (code_1, ...args_2) => __awaiter(void 0, [code_1, ...args_2], void 0, function* (code, type = MFADeviceType.Totp, deviceId) {
|
|
130
130
|
try {
|
|
131
131
|
if (!verifiedUser) {
|
|
132
132
|
throw new Error(USER_NOT_LOGGED_IN);
|
|
@@ -142,6 +142,7 @@ const useMfa = () => {
|
|
|
142
142
|
createMfaToken: {
|
|
143
143
|
singleUse: true,
|
|
144
144
|
},
|
|
145
|
+
deviceId,
|
|
145
146
|
environmentId,
|
|
146
147
|
type,
|
|
147
148
|
});
|
|
@@ -197,11 +197,12 @@ const useSocialAuth = ({ sessionTimeout, onSettled, onError, onFarcasterUrl, })
|
|
|
197
197
|
provider,
|
|
198
198
|
type: 'social',
|
|
199
199
|
});
|
|
200
|
-
if (provider === sdkApiCore.ProviderEnum.Farcaster)
|
|
200
|
+
if (provider === sdkApiCore.ProviderEnum.Farcaster) {
|
|
201
201
|
return connectWithFarcaster(authMode, {
|
|
202
202
|
captchaToken,
|
|
203
203
|
redirectUrl,
|
|
204
204
|
});
|
|
205
|
+
}
|
|
205
206
|
const state = randomString.randomString(32);
|
|
206
207
|
const verifier = randomString.randomString(43);
|
|
207
208
|
const loginUrlString = getOauthLoginUrl.getOauthLoginUrl((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _b !== void 0 ? _b : [], provider);
|
|
@@ -193,11 +193,12 @@ const useSocialAuth = ({ sessionTimeout, onSettled, onError, onFarcasterUrl, })
|
|
|
193
193
|
provider,
|
|
194
194
|
type: 'social',
|
|
195
195
|
});
|
|
196
|
-
if (provider === ProviderEnum.Farcaster)
|
|
196
|
+
if (provider === ProviderEnum.Farcaster) {
|
|
197
197
|
return connectWithFarcaster(authMode, {
|
|
198
198
|
captchaToken,
|
|
199
199
|
redirectUrl,
|
|
200
200
|
});
|
|
201
|
+
}
|
|
201
202
|
const state = randomString(32);
|
|
202
203
|
const verifier = randomString(43);
|
|
203
204
|
const loginUrlString = getOauthLoginUrl((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _b !== void 0 ? _b : [], provider);
|
|
@@ -91,9 +91,10 @@ require('qrcode');
|
|
|
91
91
|
|
|
92
92
|
const CaptchaVerifyUser = () => {
|
|
93
93
|
const { t } = reactI18next.useTranslation();
|
|
94
|
-
const { captchaAuthState } = CaptchaContext.useCaptchaContext();
|
|
94
|
+
const { captchaAuthState, setCaptchaToken } = CaptchaContext.useCaptchaContext();
|
|
95
95
|
const handleSuccess = (captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
96
96
|
var _a;
|
|
97
|
+
setCaptchaToken(captchaToken);
|
|
97
98
|
yield ((_a = captchaAuthState === null || captchaAuthState === void 0 ? void 0 : captchaAuthState.onCaptchaSuccess) === null || _a === void 0 ? void 0 : _a.call(captchaAuthState, captchaToken));
|
|
98
99
|
});
|
|
99
100
|
return (jsxRuntime.jsxs("div", { className: 'captcha-verify-user__container', children: [jsxRuntime.jsx(iconic.CaptchaWaveIcon, { className: 'captcha-verify-user__icon' }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'captcha-verify-user__title', copykey: 'dyn_captcha.verify_user_title', children: t('dyn_captcha.verify_user_title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'captcha-verify-user__subtitle', copykey: 'dyn_captcha.verify_user_subtitle', children: t('dyn_captcha.verify_user_subtitle') }), jsxRuntime.jsx(Captcha.Captcha, { handleSuccess: handleSuccess }), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'captcha-verify-user__dynamic-logo' })] }));
|
|
@@ -87,9 +87,10 @@ import 'qrcode';
|
|
|
87
87
|
|
|
88
88
|
const CaptchaVerifyUser = () => {
|
|
89
89
|
const { t } = useTranslation();
|
|
90
|
-
const { captchaAuthState } = useCaptchaContext();
|
|
90
|
+
const { captchaAuthState, setCaptchaToken } = useCaptchaContext();
|
|
91
91
|
const handleSuccess = (captchaToken) => __awaiter(void 0, void 0, void 0, function* () {
|
|
92
92
|
var _a;
|
|
93
|
+
setCaptchaToken(captchaToken);
|
|
93
94
|
yield ((_a = captchaAuthState === null || captchaAuthState === void 0 ? void 0 : captchaAuthState.onCaptchaSuccess) === null || _a === void 0 ? void 0 : _a.call(captchaAuthState, captchaToken));
|
|
94
95
|
});
|
|
95
96
|
return (jsxs("div", { className: 'captcha-verify-user__container', children: [jsx(CaptchaWaveIcon, { className: 'captcha-verify-user__icon' }), jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'captcha-verify-user__title', copykey: 'dyn_captcha.verify_user_title', children: t('dyn_captcha.verify_user_title') }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'captcha-verify-user__subtitle', copykey: 'dyn_captcha.verify_user_subtitle', children: t('dyn_captcha.verify_user_subtitle') }), jsx(Captcha, { handleSuccess: handleSuccess }), jsx(PoweredByDynamic, { classNameRoot: 'captcha-verify-user__dynamic-logo' })] }));
|
|
@@ -66,8 +66,8 @@ require('react-focus-lock');
|
|
|
66
66
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
67
67
|
var IconButton = require('../../components/IconButton/IconButton.cjs');
|
|
68
68
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
69
|
-
require('formik');
|
|
70
69
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
70
|
+
require('formik');
|
|
71
71
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
72
72
|
var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
|
|
73
73
|
require('../../components/Input/Input.cjs');
|
|
@@ -62,8 +62,8 @@ import 'react-focus-lock';
|
|
|
62
62
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
63
63
|
import { IconButton } from '../../components/IconButton/IconButton.js';
|
|
64
64
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
65
|
-
import 'formik';
|
|
66
65
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
66
|
+
import 'formik';
|
|
67
67
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
68
68
|
import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
|
|
69
69
|
import '../../components/Input/Input.js';
|
|
@@ -64,8 +64,8 @@ require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
64
64
|
require('../../../components/IconButton/IconButton.cjs');
|
|
65
65
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
66
66
|
require('../useFields.cjs');
|
|
67
|
-
var UserDataFields = require('../UserDataFields/UserDataFields.cjs');
|
|
68
67
|
var TypographyButton = require('../../../components/TypographyButton/TypographyButton.cjs');
|
|
68
|
+
var UserDataFields = require('../UserDataFields/UserDataFields.cjs');
|
|
69
69
|
require('../../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
70
70
|
require('yup');
|
|
71
71
|
require('../../../components/Input/Input.cjs');
|
|
@@ -60,8 +60,8 @@ import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
60
60
|
import '../../../components/IconButton/IconButton.js';
|
|
61
61
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
62
62
|
import '../useFields.js';
|
|
63
|
-
import { UserDataFields } from '../UserDataFields/UserDataFields.js';
|
|
64
63
|
import { TypographyButton } from '../../../components/TypographyButton/TypographyButton.js';
|
|
64
|
+
import { UserDataFields } from '../UserDataFields/UserDataFields.js';
|
|
65
65
|
import '../../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
66
66
|
import 'yup';
|
|
67
67
|
import '../../../components/Input/Input.js';
|
|
@@ -68,8 +68,8 @@ require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
68
68
|
var IconButton = require('../../../components/IconButton/IconButton.cjs');
|
|
69
69
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
70
70
|
var ErrorContainer = require('../../../components/ErrorContainer/ErrorContainer.cjs');
|
|
71
|
-
require('formik');
|
|
72
71
|
var TypographyButton = require('../../../components/TypographyButton/TypographyButton.cjs');
|
|
72
|
+
require('formik');
|
|
73
73
|
require('../../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
74
74
|
var ModalHeader = require('../../../components/ModalHeader/ModalHeader.cjs');
|
|
75
75
|
var Input = require('../../../components/Input/Input.cjs');
|
|
@@ -64,8 +64,8 @@ import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
64
64
|
import { IconButton } from '../../../components/IconButton/IconButton.js';
|
|
65
65
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
66
66
|
import { ErrorContainer } from '../../../components/ErrorContainer/ErrorContainer.js';
|
|
67
|
-
import 'formik';
|
|
68
67
|
import { TypographyButton } from '../../../components/TypographyButton/TypographyButton.js';
|
|
68
|
+
import 'formik';
|
|
69
69
|
import '../../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
70
70
|
import { ModalHeader } from '../../../components/ModalHeader/ModalHeader.js';
|
|
71
71
|
import { Input } from '../../../components/Input/Input.js';
|
|
@@ -69,8 +69,8 @@ require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
69
69
|
var IconButton = require('../../../components/IconButton/IconButton.cjs');
|
|
70
70
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
71
71
|
var ErrorContainer = require('../../../components/ErrorContainer/ErrorContainer.cjs');
|
|
72
|
-
require('formik');
|
|
73
72
|
var TypographyButton = require('../../../components/TypographyButton/TypographyButton.cjs');
|
|
73
|
+
require('formik');
|
|
74
74
|
require('../../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
75
75
|
var ModalHeader = require('../../../components/ModalHeader/ModalHeader.cjs');
|
|
76
76
|
var Input = require('../../../components/Input/Input.cjs');
|
|
@@ -65,8 +65,8 @@ import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
65
65
|
import { IconButton } from '../../../components/IconButton/IconButton.js';
|
|
66
66
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
67
67
|
import { ErrorContainer } from '../../../components/ErrorContainer/ErrorContainer.js';
|
|
68
|
-
import 'formik';
|
|
69
68
|
import { TypographyButton } from '../../../components/TypographyButton/TypographyButton.js';
|
|
69
|
+
import 'formik';
|
|
70
70
|
import '../../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
71
71
|
import { ModalHeader } from '../../../components/ModalHeader/ModalHeader.js';
|
|
72
72
|
import { Input } from '../../../components/Input/Input.js';
|
|
@@ -73,8 +73,8 @@ require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
73
73
|
var IconButton = require('../../../components/IconButton/IconButton.cjs');
|
|
74
74
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
75
75
|
var ErrorContainer = require('../../../components/ErrorContainer/ErrorContainer.cjs');
|
|
76
|
-
require('formik');
|
|
77
76
|
var TypographyButton = require('../../../components/TypographyButton/TypographyButton.cjs');
|
|
77
|
+
require('formik');
|
|
78
78
|
require('../../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
79
79
|
var ModalHeader = require('../../../components/ModalHeader/ModalHeader.cjs');
|
|
80
80
|
require('../../../components/Input/Input.cjs');
|
|
@@ -69,8 +69,8 @@ import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
69
69
|
import { IconButton } from '../../../components/IconButton/IconButton.js';
|
|
70
70
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
71
71
|
import { ErrorContainer } from '../../../components/ErrorContainer/ErrorContainer.js';
|
|
72
|
-
import 'formik';
|
|
73
72
|
import { TypographyButton } from '../../../components/TypographyButton/TypographyButton.js';
|
|
73
|
+
import 'formik';
|
|
74
74
|
import '../../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
75
75
|
import { ModalHeader } from '../../../components/ModalHeader/ModalHeader.js';
|
|
76
76
|
import '../../../components/Input/Input.js';
|
|
@@ -66,8 +66,8 @@ require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
66
66
|
var IconButton = require('../../components/IconButton/IconButton.cjs');
|
|
67
67
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
68
68
|
var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
|
|
69
|
-
require('formik');
|
|
70
69
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
70
|
+
require('formik');
|
|
71
71
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
72
72
|
var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
|
|
73
73
|
var Input = require('../../components/Input/Input.cjs');
|
|
@@ -62,8 +62,8 @@ import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
62
62
|
import { IconButton } from '../../components/IconButton/IconButton.js';
|
|
63
63
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
64
64
|
import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
|
|
65
|
-
import 'formik';
|
|
66
65
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
66
|
+
import 'formik';
|
|
67
67
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
68
68
|
import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
|
|
69
69
|
import { Input } from '../../components/Input/Input.js';
|
|
@@ -21,7 +21,6 @@ require('../../shared/utils/classes/storage/sessionStorage.cjs');
|
|
|
21
21
|
var useEffectOnce = require('../../shared/utils/hooks/useEffectOnce/useEffectOnce.cjs');
|
|
22
22
|
require('@dynamic-labs/utils');
|
|
23
23
|
require('../../shared/consts/index.cjs');
|
|
24
|
-
var CaptchaContext = require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
25
24
|
|
|
26
25
|
/**
|
|
27
26
|
* This view is used to display the QR code for the farcaster connection.
|
|
@@ -29,7 +28,6 @@ var CaptchaContext = require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
29
28
|
*/
|
|
30
29
|
const FarcasterQrCodeView = () => {
|
|
31
30
|
const { setError } = ErrorContext.useErrorContext();
|
|
32
|
-
const { captchaToken } = CaptchaContext.useCaptchaContext();
|
|
33
31
|
const [url, setUrl] = React.useState(undefined);
|
|
34
32
|
const { connectSocialAccount } = useSocialAuth.useSocialAuth({
|
|
35
33
|
onError: () => setError('Something went wrong'),
|
|
@@ -39,7 +37,6 @@ const FarcasterQrCodeView = () => {
|
|
|
39
37
|
useEffectOnce.useEffectOnce(() => {
|
|
40
38
|
connectSocialAccount({
|
|
41
39
|
authMode: 'signin',
|
|
42
|
-
captchaToken: captchaToken,
|
|
43
40
|
provider: sdkApiCore.ProviderEnum.Farcaster,
|
|
44
41
|
});
|
|
45
42
|
});
|
|
@@ -17,7 +17,6 @@ import '../../shared/utils/classes/storage/sessionStorage.js';
|
|
|
17
17
|
import { useEffectOnce } from '../../shared/utils/hooks/useEffectOnce/useEffectOnce.js';
|
|
18
18
|
import '@dynamic-labs/utils';
|
|
19
19
|
import '../../shared/consts/index.js';
|
|
20
|
-
import { useCaptchaContext } from '../../context/CaptchaContext/CaptchaContext.js';
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* This view is used to display the QR code for the farcaster connection.
|
|
@@ -25,7 +24,6 @@ import { useCaptchaContext } from '../../context/CaptchaContext/CaptchaContext.j
|
|
|
25
24
|
*/
|
|
26
25
|
const FarcasterQrCodeView = () => {
|
|
27
26
|
const { setError } = useErrorContext();
|
|
28
|
-
const { captchaToken } = useCaptchaContext();
|
|
29
27
|
const [url, setUrl] = useState(undefined);
|
|
30
28
|
const { connectSocialAccount } = useSocialAuth({
|
|
31
29
|
onError: () => setError('Something went wrong'),
|
|
@@ -35,7 +33,6 @@ const FarcasterQrCodeView = () => {
|
|
|
35
33
|
useEffectOnce(() => {
|
|
36
34
|
connectSocialAccount({
|
|
37
35
|
authMode: 'signin',
|
|
38
|
-
captchaToken: captchaToken,
|
|
39
36
|
provider: ProviderEnum.Farcaster,
|
|
40
37
|
});
|
|
41
38
|
});
|
package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs
CHANGED
|
@@ -66,8 +66,8 @@ require('react-focus-lock');
|
|
|
66
66
|
require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
67
67
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
68
68
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
69
|
-
require('formik');
|
|
70
69
|
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
|
|
70
|
+
require('formik');
|
|
71
71
|
require('../../../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
72
72
|
require('../../../../components/Input/Input.cjs');
|
|
73
73
|
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js
CHANGED
|
@@ -62,8 +62,8 @@ import 'react-focus-lock';
|
|
|
62
62
|
import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
63
63
|
import '../../../../components/IconButton/IconButton.js';
|
|
64
64
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
65
|
-
import 'formik';
|
|
66
65
|
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
66
|
+
import 'formik';
|
|
67
67
|
import '../../../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
68
68
|
import '../../../../components/Input/Input.js';
|
|
69
69
|
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
@@ -110,6 +110,7 @@ const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLa
|
|
|
110
110
|
var _a;
|
|
111
111
|
const providerEnum = getProviderEnumForSocialSignInProvider.getProviderEnumForSocialSignInProvider(provider);
|
|
112
112
|
setSocialProvider(provider);
|
|
113
|
+
// Captcha Enabled
|
|
113
114
|
if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled) {
|
|
114
115
|
engageCaptcha({
|
|
115
116
|
authMethod: 'social',
|
|
@@ -125,6 +126,7 @@ const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLa
|
|
|
125
126
|
});
|
|
126
127
|
return;
|
|
127
128
|
}
|
|
129
|
+
// No Captcha enabled
|
|
128
130
|
setView('social-redirect-view');
|
|
129
131
|
setShowAuthFlow(true);
|
|
130
132
|
connectSocialAccount({
|
|
@@ -106,6 +106,7 @@ const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLa
|
|
|
106
106
|
var _a;
|
|
107
107
|
const providerEnum = getProviderEnumForSocialSignInProvider(provider);
|
|
108
108
|
setSocialProvider(provider);
|
|
109
|
+
// Captcha Enabled
|
|
109
110
|
if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled) {
|
|
110
111
|
engageCaptcha({
|
|
111
112
|
authMethod: 'social',
|
|
@@ -121,6 +122,7 @@ const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLa
|
|
|
121
122
|
});
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
125
|
+
// No Captcha enabled
|
|
124
126
|
setView('social-redirect-view');
|
|
125
127
|
setShowAuthFlow(true);
|
|
126
128
|
connectSocialAccount({
|
package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs
CHANGED
|
@@ -93,14 +93,13 @@ var SocialSignIn = require('../../../../../components/SocialSignIn/SocialSignIn.
|
|
|
93
93
|
const MagicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLayout, }) => {
|
|
94
94
|
const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
|
|
95
95
|
const { socialProvider, setSocialProvider, socialWalletConnector, enabledSocialProviders, } = SocialRedirectContext.useSocialRedirectContext();
|
|
96
|
-
const { engageCaptcha
|
|
96
|
+
const { engageCaptcha } = CaptchaContext.useCaptchaContext();
|
|
97
97
|
const { mutate: onClickProvider, isLoading } = useMutation.useMutation((provider) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
98
98
|
var _a;
|
|
99
99
|
if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled) {
|
|
100
100
|
engageCaptcha({
|
|
101
101
|
authMethod: 'social',
|
|
102
102
|
onCaptchaSuccess: (captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
103
|
-
setCaptchaTokenInLS(captchaToken);
|
|
104
103
|
setSocialProvider(provider);
|
|
105
104
|
yield (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.endSession());
|
|
106
105
|
return socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.connect(provider);
|
package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js
CHANGED
|
@@ -89,14 +89,13 @@ import { SocialSignIn } from '../../../../../components/SocialSignIn/SocialSignI
|
|
|
89
89
|
const MagicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLayout, }) => {
|
|
90
90
|
const { projectSettings } = useInternalDynamicContext();
|
|
91
91
|
const { socialProvider, setSocialProvider, socialWalletConnector, enabledSocialProviders, } = useSocialRedirectContext();
|
|
92
|
-
const { engageCaptcha
|
|
92
|
+
const { engageCaptcha } = useCaptchaContext();
|
|
93
93
|
const { mutate: onClickProvider, isLoading } = useMutation((provider) => __awaiter(void 0, void 0, void 0, function* () {
|
|
94
94
|
var _a;
|
|
95
95
|
if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled) {
|
|
96
96
|
engageCaptcha({
|
|
97
97
|
authMethod: 'social',
|
|
98
98
|
onCaptchaSuccess: (captchaToken) => __awaiter(void 0, void 0, void 0, function* () {
|
|
99
|
-
setCaptchaTokenInLS(captchaToken);
|
|
100
99
|
setSocialProvider(provider);
|
|
101
100
|
yield (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.endSession());
|
|
102
101
|
return socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.connect(provider);
|
|
@@ -62,8 +62,8 @@ require('react-focus-lock');
|
|
|
62
62
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
63
63
|
require('../../components/IconButton/IconButton.cjs');
|
|
64
64
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
65
|
-
require('formik');
|
|
66
65
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
66
|
+
require('formik');
|
|
67
67
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
68
68
|
require('../../components/Input/Input.cjs');
|
|
69
69
|
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
@@ -58,8 +58,8 @@ import 'react-focus-lock';
|
|
|
58
58
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
59
59
|
import '../../components/IconButton/IconButton.js';
|
|
60
60
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
61
|
-
import 'formik';
|
|
62
61
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
62
|
+
import 'formik';
|
|
63
63
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
64
64
|
import '../../components/Input/Input.js';
|
|
65
65
|
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs
CHANGED
|
@@ -68,8 +68,8 @@ var Icon = require('../../components/Icon/Icon.cjs');
|
|
|
68
68
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
69
69
|
require('../../components/IconButton/IconButton.cjs');
|
|
70
70
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
71
|
-
require('formik');
|
|
72
71
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
72
|
+
require('formik');
|
|
73
73
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
74
74
|
require('../../components/Input/Input.cjs');
|
|
75
75
|
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js
CHANGED
|
@@ -64,8 +64,8 @@ import { Icon } from '../../components/Icon/Icon.js';
|
|
|
64
64
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
65
65
|
import '../../components/IconButton/IconButton.js';
|
|
66
66
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
67
|
-
import 'formik';
|
|
68
67
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
68
|
+
import 'formik';
|
|
69
69
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
70
70
|
import '../../components/Input/Input.js';
|
|
71
71
|
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
@@ -63,8 +63,8 @@ require('react-focus-lock');
|
|
|
63
63
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
64
64
|
require('../../components/IconButton/IconButton.cjs');
|
|
65
65
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
66
|
-
require('formik');
|
|
67
66
|
var Button = require('../../components/Button/Button.cjs');
|
|
67
|
+
require('formik');
|
|
68
68
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
69
69
|
var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
|
|
70
70
|
require('../../components/Input/Input.cjs');
|
|
@@ -59,8 +59,8 @@ import 'react-focus-lock';
|
|
|
59
59
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
60
60
|
import '../../components/IconButton/IconButton.js';
|
|
61
61
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
62
|
-
import 'formik';
|
|
63
62
|
import { Button } from '../../components/Button/Button.js';
|
|
63
|
+
import 'formik';
|
|
64
64
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
65
65
|
import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
|
|
66
66
|
import '../../components/Input/Input.js';
|
|
@@ -68,8 +68,8 @@ var Icon = require('../../components/Icon/Icon.cjs');
|
|
|
68
68
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
69
69
|
require('../../components/IconButton/IconButton.cjs');
|
|
70
70
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
71
|
-
require('formik');
|
|
72
71
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
72
|
+
require('formik');
|
|
73
73
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
74
74
|
var spinner = require('../../components/Spinner/spinner.cjs');
|
|
75
75
|
require('../../components/Input/Input.cjs');
|
|
@@ -64,8 +64,8 @@ import { Icon } from '../../components/Icon/Icon.js';
|
|
|
64
64
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
65
65
|
import '../../components/IconButton/IconButton.js';
|
|
66
66
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
67
|
-
import 'formik';
|
|
68
67
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
68
|
+
import 'formik';
|
|
69
69
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
70
70
|
import { Spinner } from '../../components/Spinner/spinner.js';
|
|
71
71
|
import '../../components/Input/Input.js';
|
|
@@ -65,8 +65,8 @@ require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
65
65
|
require('../../components/IconButton/IconButton.cjs');
|
|
66
66
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
67
67
|
var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
|
|
68
|
-
require('formik');
|
|
69
68
|
var Button = require('../../components/Button/Button.cjs');
|
|
69
|
+
require('formik');
|
|
70
70
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
71
71
|
var Input = require('../../components/Input/Input.cjs');
|
|
72
72
|
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
@@ -61,8 +61,8 @@ import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
61
61
|
import '../../components/IconButton/IconButton.js';
|
|
62
62
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
63
63
|
import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
|
|
64
|
-
import 'formik';
|
|
65
64
|
import { Button } from '../../components/Button/Button.js';
|
|
65
|
+
import 'formik';
|
|
66
66
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
67
67
|
import { Input } from '../../components/Input/Input.js';
|
|
68
68
|
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
@@ -63,8 +63,8 @@ require('react-focus-lock');
|
|
|
63
63
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
64
64
|
require('../../components/IconButton/IconButton.cjs');
|
|
65
65
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
66
|
-
require('formik');
|
|
67
66
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
67
|
+
require('formik');
|
|
68
68
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
69
69
|
var spinner = require('../../components/Spinner/spinner.cjs');
|
|
70
70
|
require('../../components/Input/Input.cjs');
|
|
@@ -103,7 +103,7 @@ const MfaSecureDeviceView = ({ type }) => {
|
|
|
103
103
|
const onMfaVerificationBackClick = () => {
|
|
104
104
|
setView('mfa-secure-device', { type });
|
|
105
105
|
};
|
|
106
|
-
setView('mfa-verification', { showBackButton: true, type }, {
|
|
106
|
+
setView('mfa-verification', { deviceId: data === null || data === void 0 ? void 0 : data.id, showBackButton: true, type }, {
|
|
107
107
|
onBackClick: onMfaVerificationBackClick,
|
|
108
108
|
});
|
|
109
109
|
};
|
|
@@ -59,8 +59,8 @@ import 'react-focus-lock';
|
|
|
59
59
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
60
60
|
import '../../components/IconButton/IconButton.js';
|
|
61
61
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
62
|
-
import 'formik';
|
|
63
62
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
63
|
+
import 'formik';
|
|
64
64
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
65
65
|
import { Spinner } from '../../components/Spinner/spinner.js';
|
|
66
66
|
import '../../components/Input/Input.js';
|
|
@@ -99,7 +99,7 @@ const MfaSecureDeviceView = ({ type }) => {
|
|
|
99
99
|
const onMfaVerificationBackClick = () => {
|
|
100
100
|
setView('mfa-secure-device', { type });
|
|
101
101
|
};
|
|
102
|
-
setView('mfa-verification', { showBackButton: true, type }, {
|
|
102
|
+
setView('mfa-verification', { deviceId: data === null || data === void 0 ? void 0 : data.id, showBackButton: true, type }, {
|
|
103
103
|
onBackClick: onMfaVerificationBackClick,
|
|
104
104
|
});
|
|
105
105
|
};
|