Facebook Social Login with Web3Auth
Facebook Login enables users to sign in using their Facebook credentials. Web3Auth supports Facebook as a social login provider, allowing developers to offer a familiar and quick authentication method for users with Facebook accounts.
To integrate Facebook with Web3Auth, developers must first create a Facebook App via the Meta for Developers Console.
Create a Facebook app
-
Follow Facebook's instructions to create a new app.
-
When creating an app, make sure to select
Consumer
from this screen to use Facebook Login. -
On the next screen, you'll be presented with different products you can integrate into your Facebook app. Click "Set Up" in the card representing the Facebook Login capability.
-
Paste the following as a redirect URI into the "Valid OAuth Redirect URIs" field.
-
Obtain the "App ID" and "App Secret" from the Settings > Basic screen.
Create a Facebook Connection
To use this feature, please enable Facebook
from the Social Connections section in the
Web3Auth Dashboard.
By default, Web3Auth uses its own pre-configured credentials for Facebook login.

Follow these steps to create a Facebook connection:
- Visit the Web3Auth Dashboard.
- Go to the
Social Connections
section. - Click on the
Settings
icon near the Facebook connection. - Enter the
Auth Connection ID
. - Enter the
Facebook App ID
. - Enter the
Facebook App Secret
. - Finally, click on the
Add Connection
button.

Usage
Since, the Facebook Connection
details are available from Dashboard, developers don't need to pass
any additional parameters to the Web3AuthProvider
.
Follow our Quickstart Guide to setup the basic flow.
Implicit Login with Facebook
await connectTo(WALLET_CONNECTORS.AUTH, {
authConnection: AUTH_CONNECTION.FACEBOOK,
authConnectionId: "w3a-facebook-demo",
});