When I use Facebook Login on sapphire_mainnet, there is a facebook login issue
here is our web3auth modal code.
there is no customize authentication config code.
so, i think this error didn’t caused by code, but caused on web3auth itself.
let chainConfig;
const network = process.env.NEXT_PUBLIC_APTOS_NETWORK;
if (network === "testnet") {
chainConfig = {
chainNamespace: CHAIN_NAMESPACES.OTHER,
chainId: "0x7E6", //
rpcTarget: "https://rpc.ankr.com/http/aptos_testnet/v1",
// Avoid using public rpcTarget in production.
displayName: "Aptos Testnet",
blockExplorerUrl: "https://testnet.algoexplorer.io",
ticker: "APT",
tickerName: "Aptos",
};
} else {
chainConfig = {
chainNamespace: CHAIN_NAMESPACES.OTHER,
chainId: "0x1", //
rpcTarget: "https://rpc.ankr.com/http/aptos/v1",
// Avoid using public rpcTarget in production.
displayName: "Aptos Mainnet",
blockExplorerUrl: "https://algoexplorer.io",
ticker: "APT",
tickerName: "Aptos",
};
}
const privateKeyProvider = new CommonPrivateKeyProvider({
config: { chainConfig: chainConfig },
});
const web3authNoModal = new Web3AuthNoModal({
// Get it from Web3Auth Dashboard
clientId: process.env.NEXT_PUBLIC_WEB3AUTH_CLIENT_ID!,
web3AuthNetwork:
network === "mainnet"
? WEB3AUTH_NETWORK.SAPPHIRE_MAINNET
: network === "testnet"
? WEB3AUTH_NETWORK.TESTNET
: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
privateKeyProvider: privateKeyProvider,
});
const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
uxMode: UX_MODE.POPUP,
},
});
web3authNoModal.configureAdapter(openloginAdapter);
setWeb3auth(web3authNoModal);
is it correct? when this error clear? how do i do till it’s done?