How to use Facebook with Web3Auth Plug and Play No Modal SDK
This guide will cover the basics of how to set up your Web3Auth SDK and Facebook Login for the custom authentication and provide you the steps on how to develop a basic web application on the Ethereum blockchain.
Live Demo: https://web3auth-core-facebook-demo.vercel.app
Quick Start
npx degit Web3Auth/web3auth-pnp-examples/web-no-modal-sdk/custom-authentication/single-verifier-examples/facebook-no-modal-example w3a-facebook-demo && cd w3a-facebook-demo && npm install && npm run start
How it works?
When integrating Web3Auth with Facebook Login the flow looks something like this:
-
When a user logs in with
Facebook
, Facebook sends a JWTid_token
to the app. This JWT token is sent to the Web3Auth SDK's login function. -
Finally, on successful validation of the JWT token, Web3Auth SDK will generate a private key for the user, in a self custodial way, resulting in easy onboarding for your user to the application.
Prerequisites
-
For Web Apps: A basic knowledge of JavaScript is required to use Web3Auth SDK.
-
For Mobile Apps: For the Web3Auth Mobile SDKs, you have a choice between iOS, Android, React Native & Flutter. Please refer to the Web3Auth SDK Reference for more information.
-
Create a Web3Auth account on the Web3Auth Dashboard
- A Facebook Developer account to be used as Login provider for Web3Auth Custom Authentication.