const web3AuthOptions: Web3AuthOptions = {
clientId,
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
uiConfig: {
uxMode: "redirect",
appName: "...",
appUrl: "....",
theme: {
primary: "gray",
},
logoLight: "...",
logoDark: "...",
defaultLanguage: "en", // en, de, ja, ko, zh, es, fr, pt, nl, tr
mode: "dark", // whether to enable dark mode. defaultValue: auto
useLogoLoader: true,
},
privateKeyProvider: privateKeyProvider,
sessionTime: 86400 * 7, // 7 days
// useCoreKitKey: true,
};
const web3auth = new Web3Auth(web3AuthOptions as Web3AuthOptions);
const authAdapter = new AuthAdapter({
loginSettings: {
mfaLevel: "none",
curve: "ed25519", // allowed values "secp256k1" (default, EVM) or "ed25519" (Solana)
},
adapterSettings: {
uxMode: "redirect", // "redirect" | "popup"
whiteLabel: {
logoLight: "...o",
logoDark: "...",
defaultLanguage: "en", // en, de, ja, ko, zh, es, fr, pt, nl, tr
mode: "light", // whether to enable dark, light or auto mode. defaultValue: auto [ system theme]
}
},
privateKeyProvider: privateKeyProvider
});
web3auth.configureAdapter(authAdapter)
const adapters = await getInjectedAdapters({ options: web3AuthOptions })
const phantomAdapter = adapters.find((e) => e.name == "phantom")
if (phantomAdapter) {
web3auth.configureAdapter(phantomAdapter)
}
setWeb3auth(web3auth);
await web3auth.initModal();
if (web3auth.connected) {
**// CODE HERE WON'T GET CALLED!!!!!!!!!!!!!!!!!!!!!!!!!!!!**
....