Archived Content from Web3Auth Community
This topic was originally posted by githubdiscussions on 1/3/2023.
This content has been migrated from our previous community forum to preserve valuable discussions.
This is my code
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const initAuth = async () => { try { web3auth = new Web3Auth({ clientId: process.env.clientId, // Get your Client ID from Web3Auth Dashboard chainConfig: { chainNamespace: 'eip155' }, uiConfig: { theme: 'dark', loginMethodsOrder: ['google', 'facebook'], appLogo: 'https://web3auth.io/community/images/w3a-L-Favicon-1.svg', // Your App Logo Here defaultLanguage: 'en', modalZIndex: '99998' } });await web3auth.initModal({ modalConfig: { [WALLET_ADAPTERS.OPENLOGIN]: { label: 'openlogin', loginMethods: { google: { name: 'google login', showOnModal: true, showOnDesktop: true }, facebook: { name: 'facebook login', showOnModal: true, showOnDesktop: true } }, // setting it to false will hide all social login methods from modal. showOnModal: true } } }); } catch (err) { console.log(err); } };
let connect = async () => {
web3authProvider = await web3auth.connect();
};
">
const initAuth = async () => {
try {
web3auth = new Web3Auth({
clientId:
process.env.clientId, // Get your Client ID from Web3Auth Dashboard
chainConfig: {
chainNamespace: ‘eip155’
},
uiConfig: {
theme: ‘dark’,
loginMethodsOrder: [‘google’, ‘facebook’],
appLogo: ‘https://web3auth.io/community/images/w3a-L-Favicon-1.svg’, // Your App Logo Here
defaultLanguage: ‘en’,
modalZIndex: ‘99998’
}
});await web3auth.initModal({ modalConfig: { [WALLET_ADAPTERS.OPENLOGIN]: { label: 'openlogin', loginMethods: { google: { name: 'google login', showOnModal: true, showOnDesktop: true }, facebook: { name: 'facebook login', showOnModal: true, showOnDesktop: true } }, // setting it to false will hide all social login methods from modal. showOnModal: true } } }); } catch (err) { console.log(err); } };
let connect = async () => {
web3authProvider = await web3auth.connect();
};
What am I doing wrong ? Pls help me out .Thanks.
Originally posted by: dheesimha
Check the discussion at: https://github.com/orgs/Web3Auth/discussions/1153
