Social Logins
Learn how to add social logins to your dapp.
Etherspot has partnered with Web3Auth, to bring users a frictionless Web3 experience by combining the power of Web3auth’s social login onboarding and Etherspot’s Smart Wallet infrastructure.
Users can easily login with a number of different platforms such as Twitter or Google mail. An Etherspot smart contract wallet is then created for them and they are ready to interact with your dapp.
You should have installed the appropriate Etherspot Prime and Web3Auth packages before proceeding.
Packages
Below is an example of a working Web3Auth social login implementation using the Etherspot Prime SDK.
A full example which you can build and deploy can be found here.
Variables to replace
WEB3AUTH_CHAIN_ID_HEX is the chain id in hex, for example 0xaa36a7 for Sepolia.
For the Etherspot Prime SDK part of this we only look at:
- If it’s a chain we support.
- Whether it’s a mainnet or test net chain. Then we only generate wallets on either of these.
WEB3AUTH_CLIENT_ID is the web3auth client id specific to your project. You can learn at how to get one here.