When asking for help in this category, please make sure to provide the following details:
-
SDK Version(package.json):
“@web3auth/base”: “^9.0.0”,
“@web3auth/ethereum-provider”: “^9.0.0”,
“@web3auth/modal”: “^10.0.5”,
“@web3auth/solana-provider”: “^9.7.0”, -
Platform: ReactJS in web browser
-
Browser Console Screenshots:
-
My code config:
const web3AuthContextConfig = {
web3AuthOptions: {
clientId: 'BE9SGsntpxv6Utr9Z0uYFJZKocyXejbUhgvwmqg5_he_RcxUMREfJtRssunMqmpwG8HloKMEEctsgkNNfj0YBnc',
defaultChainId: '0x67',
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
uiConfig: {
mode: 'dark',
defaultLanguage: language,
borderRadiusType: 'medium',
displayInstalledExternalWallets: false,
displayExternalWalletsCount: false,
},
modalConfig: {
connectors: {
[WALLET_CONNECTORS.AUTH]: {
label: 'auth',
loginMethods: {
google: {
name: 'Google',
showOnModal: true,
authConnectionId: 'w3a-google-bth',
},
email_passwordless: {
name: 'Email',
showOnModal: true,
authConnectionId: 'w3a-email-btn',
},
apple: {
name: 'Apple',
showOnModal: true,
},
},
showOnModal: true,
},
[WALLET_CONNECTORS.METAMASK]: {
label: 'metamask',
showOnModal: false,
},
},
hideWalletDiscovery: true,
},
},
};
- My code connect:
await connectTo(WALLET_CONNECTORS.AUTH, {
authConnection: AUTH_CONNECTION.EMAIL_PASSWORDLESS,
authConnectionId: 'w3a-email-btn',
extraLoginOptions: {
login_hint: email,
},
});
- My code get privateKey:
import { useWeb3Auth as useWeb3AuthContext, useWeb3AuthUser } from '@web3auth/modal/react';
const { web3Auth, provider, status } = useWeb3AuthContext();
const privateKey = await web3Auth?.provider?.request({ method: METHOD_GET_PRIVATE_KEY[walletType] });
- My Project Settings in Dashboard:
Unable to get privateKey from Solana Chain using “solanaPrivateKey” method.
I have not found the cause, please help me. Thank you very much.