Does Discord have OAuth?
Yes. Discord runs an OAuth2 server, and every application created in the Developer Portal is an OAuth2 app with its own client ID and client secret. That is what people mean by a “Discord OAuth app”. The same app can also have a bot user, so one app can both sign you in on a website and sit in your server as a bot.
Discord supports three standard OAuth2 grants and two of its own flows:
| Flow | Used for | Gets a refresh token |
|---|---|---|
| Authorization code | Websites with a server, such as verify pages and dashboards | Yes |
| Implicit | Older browser-only apps. Discord tells production apps to use the code grant with PKCE instead | No |
| Client credentials | The developer testing with their own account | No |
| Bot authorization | Adding a bot to a server you manage | No redirect at all |
| Webhook | Letting an app post into one channel you pick | Yes, plus the webhook |
What happens when you click Authorize
This is the authorization code flow, the one almost every “Sign in with Discord” button uses.
- The site sends you to Discord. The link goes to discord.com with the app’s client ID, the permissions it wants and a random value called
state. - You sign in on Discord, not on the site. Discord shows the app’s name and a plain list of what it is asking for. Those permissions are called scopes.
- You approve or cancel. Nothing is shared until you click Authorize.
- Discord sends you back with a code. The browser returns to the app’s registered address carrying a one-time
codeand the samestate. The app checks that state matches the one it stored, which blocks forged requests. - The app swaps the code for tokens. Its server sends the code plus its client secret to Discord and gets an access token and a refresh token. Discord’s example response has the access token expiring after 604,800 seconds, which is 7 days.
- The app uses the token. It calls Discord’s API on your behalf, limited to what you approved. When the access token expires it uses the refresh token to get a new one, without asking you again.
The important part for you: your password never leaves discord.com, and the app can only do what was on the list you approved.
OAuth vs OAuth2
“OAuth” on its own usually means OAuth 2.0 today. The older version still exists on a few services, so here is the difference.
| OAuth 1.0 | OAuth 2.0 | |
|---|---|---|
| Standard | RFC 5849 (2010) | RFC 6749 (2012), replaces 1.0 |
| Protecting requests | The app signs every request | HTTPS protects the connection |
| What the app sends | Signed request with secrets | A bearer access token |
| Getting a new token | Not part of the standard | Refresh tokens |
| Used by Discord | No | Yes |
Signing in vs adding a bot
Adding a bot is a modified OAuth2 flow. The link names the bot and the permissions it wants, you pick a server you manage, and the bot joins. There is no redirect back to a website. A full sign-in flow is different: it is about your account, not a server. Some invite links ask for both at once. Then the bot invite continues into the full sign-in flow, with a redirect back to the developer’s site at the end. For how bots behave once they are in, see how Discord bots work.
Before you click Authorize
- Check the address bar says discord.com. A copy of the screen on another domain is a phishing page.
- Read the app name and the list. A quiz bot has no reason to join servers for you.
- Cancel if anything looks off. Cancelling shares nothing.
- Review old apps now and then in User Settings, Authorized Apps, and deauthorize what you no longer use.
How VaultCord uses Discord OAuth
Verification on VaultCord is an authorization code flow. A member passes the captcha and checks, then authorizes your VaultCord bot’s app on Discord. One of the permissions lets the app add them to a server later, which is what makes member restore possible. If a member deauthorizes the app, VaultCord detects it instantly and keeps its member records in sync, so they are not pulled anywhere afterwards.
The homepage walks through the whole restore, from the Authorize click to the pull. Start on the Free plan to see the flow on a test server.