> ## Documentation Index
> Fetch the complete documentation index at: https://thenile.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord

> Integrate Discord Single Sign-On with Nile Auth

**1. Setup Discord Developer Portal**

1. Create a [Discord Developer](https://discord.com/developers/applications) account.
2. Follow the documentation for [creating an OAuth2 application](https://discord.com/developers/docs/topics/oauth2) in Discord.
3. Obtain a **Client ID** and **Client Secret** from [Discord OAuth](https://discord.com/developers/applications). Be sure to set the redirect URL to your application handling the Nile Auth requests.
   > [accordion] Discord dashboard example
   >
   > ![Discord SSO](https://mintcdn.com/nile/6B-b9nH3DSiJ_Uwi/images/auth/discordexample.png?fit=max\&auto=format\&n=6B-b9nH3DSiJ_Uwi\&q=85\&s=1d5ca31da9c41eafadb97cc53c68c9ed)

**2. Save Client ID and Client Secret in Nile**

Save them to your database at `console.thenile.dev` under Discord in **Tenants
& Users -> Configuration** ![Discord configuration on
console.thenile.dev](https://mintcdn.com/nile/ZhObK_CvFMgzM-yj/images/singlesignon/discord.png?fit=max\&auto=format\&n=ZhObK_CvFMgzM-yj\&q=85\&s=1f9f6657a730894406098ad528bf4fb5)

**3. Add the Discord button to your login page**

The button will redirect the user to Discord for authentication. Upon successful authentication, the user will be redirected back to your application.

```jsx theme={null}
import { DiscordSignInButton } from '@niledatabase/react';

function App() {
  return (
    <div>
      <DiscordSignInButton callbackUrl="/" />
    </div>
  );
}
```

## Related Topics

* [OAuth Concepts](https://thenile.dev/docs/auth/concepts/oauth.md)
* [User Management](https://thenile.dev/docs/auth/concepts/users.md)
* [Other SSO Providers](https://thenile.dev/docs/auth/singlesignon/github.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.