Discord Social Login with Web3Auth
Discord Login is a social login provider that allows users to sign in using their Discord credentials. Web3Auth supports Discord as a social login provider, allowing developers to offer a familiar and quick authentication method for users with Discord accounts.
To integrate Discord with Web3Auth, developers must first create a Discord App via the Discord Developer Portal.
Create a Discord app
-
Create a Discord API application.
-
Navigate to OAuth2 from the sidebar, and paste the following as Redirect URI into the "Redirect URI" field.
-
Don't forget to save your changes!
-
Next, obtain the "Client ID" from here. We will use this in our Web3Auth Dashboard.
Create a Discord Connection
To use this feature, please enable Discord
from the Social Connections section in the
Web3Auth Dashboard.
By default, Web3Auth uses its own pre-configured credentials for Discord login.

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

Usage
Since, the Discord 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.
Login with Discord
await connectTo(WALLET_CONNECTORS.AUTH, {
authConnection: AUTH_CONNECTION.DISCORD,
authConnectionId: "w3a-discord-demo",
});