can you show the code which you are adding for authentication
maybe take a look at these docs and tutorial to check if you are missing something
https://v1docs.moralis.io/moralis-dapp/users/web3-login/web3auth
import React from âreactâ;
import { useMoralis } from âreact-moralisâ;
const SignUp = () => {
const { authenticate, authError, isAuthenticating, Moralis } = useMoralis();
const handleCustomLogin = async () => {
await authenticate({
provider: "web3Auth",
clientId:
"BNK77dK_ZitdNapkIclvAT6-iPJlutL6iO96MMhVi_KKVVTK5SXOPNjHCOfC--A4F1uc5Wkhj5Ev_3TlYwdqXMU",
chainId: 1,
loginMethodsOrder: [
"twitter",
"google",
"facebook",
"metamask",
"reddit",
"discord",
"twitch",
"apple",
"line",
"github",
"kakao",
"linkedin",
"weibo",
"wechat",
"email_passwordless",
],
theme: ["red"],
});
};
console.log(handleCustomLogin);
return (
<div>
{/* <Image className={styles.img} src={Logo} width={80} height={80} /> */}
{isAuthenticating && <p>Authenticating</p>}
{authError && <p>{JSON.stringify(authError.message)}</p>}
<div>
<button onClick={handleCustomLogin}>Login with Web3Auth</button>
</div>
</div>
);
};
export default SignUp;
I follow your step but can not solve
â
I Follow step but can not solve
I am clearly all local storage but Is not work
Can you give the current status, like where exactly you are facing the issue?
Your code seems ok. The authentication function which you shared is working fine when I tested in my react app.
the versions of the packages which I am using are
"moralis-v1": "^1.11.0",
"react-moralis": "1.4.0",
Actually need a implement this prosess ,
but when I code implement boiler plate then give out put this type
https://drive.google.com/file/d/1q7YCqX4inwgW6As44DUQo2bm6AW19vqW/view?usp=sharing
How can solve ??
Can you post your package.json contents here.
For some reason even though youâve specified web3Auth in authenticate it still seems to be initiating a connection with the injected provider or wallet (MetaMask). I noticed in your video you already authenticated first (address showing in corner), try it without doing that and clear all cookies/localStorage/cache.
Here is Eth boilerplate pakejson
{
ânameâ: âethereum-boilerplateâ,
âversionâ: â0.1.0â,
âprivateâ: true,
âdependenciesâ: {
"@ant-design/icons": "^4.7.0",
"@emotion/react": "^11.10.0",
"@emotion/styled": "^11.10.0",
"@mui/icons-material": "^5.10.2",
"@mui/material": "^5.10.2",
"@mui/styled-engine-sc": "^5.10.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@walletconnect/web3-provider": "^1.6.6",
"antd": "^4.16.13",
"moralis": "^0.0.118",
"react": "^17.0.2",
"react-blockies": "^1.4.1",
"react-dom": "^17.0.2",
"react-icons": "^4.4.0",
"react-moralis": "^0.2.6",
"react-router": "^5.2.1",
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3",
"styled-components": "^5.3.5",
"swiper": "^8.3.2",
"web-vitals": "^1.0.1",
"yarn": "^1.22.17"
},
âscriptsâ: {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"devchain": "node Truffle/scripts/devChain.js",
"connect": "moralis-admin-cli connect-local-devchain",
"watch:events": "moralis-admin-cli add-contract",
"deploy": "node Truffle/scripts/deployContract.js"
},
âeslintConfigâ: {
"extends": [
"react-app",
"react-app/jest"
]
},
âbrowserslistâ: {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Here is My authentication pakeg json @alex
{
ânameâ: âsuffle_authâ,
âversionâ: â0.1.0â,
âprivateâ: true,
âdependenciesâ: {
"@emotion/react": "^11.9.0",
"@emotion/styled": "^11.8.1",
"@mui/icons-material": "^5.8.0",
"@mui/material": "^5.8.1",
"@mui/styled-engine-sc": "^5.8.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.2.0",
"@testing-library/user-event": "^13.5.0",
"@walletconnect/web3-provider": "^1.7.8",
"@web3auth/web3auth": "^1.2.0",
"cors": "^2.8.5",
"magic-sdk": "7.0.0",
"moralis": "^1.7.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-icons": "^4.3.1",
"react-moralis": "^1.3.5",
"react-scripts": "^4.0.3",
"styled-components": "^5.3.5",
"web-vitals": "^2.1.4",
"web3": "^0.20.6"
},
âscriptsâ: {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
âeslintConfigâ: {
"extends": [
"react-app",
"react-app/jest"
]
},
âbrowserslistâ: {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
The NFT boilerplate has much older dependencies compared to the base ethereum-boilerplate (which it is based on), try using updated ones and then work from there:
[email protected]
[email protected]
Here is My authentication pakeg json @glad
Iâm not sure what this is for, it doesnât related to the NFT/OpenSea clone boilerplate?
When i go Ethr thamplate pakge then bolerplate work , But when a web3 install then give error
Can you post your package.json. What did you change to now get this error?
Yes, this error can be solved, but my actually need an email authentication
but he is not working can you help me @alex
what is chainId mainnet can you tell me any one