Skip to content

How Discord OAuth works when you click Authorize

Every time a site asks you to sign in with Discord, it is using OAuth2. Here is what Discord OAuth is, what each step does, and how to take access back.

Updated 2026-11-19

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:

FlowUsed forGets a refresh token
Authorization codeWebsites with a server, such as verify pages and dashboardsYes
ImplicitOlder browser-only apps. Discord tells production apps to use the code grant with PKCE insteadNo
Client credentialsThe developer testing with their own accountNo
Bot authorizationAdding a bot to a server you manageNo redirect at all
WebhookLetting an app post into one channel you pickYes, 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.

  1. 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.
  2. 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.
  3. You approve or cancel. Nothing is shared until you click Authorize.
  4. Discord sends you back with a code. The browser returns to the app’s registered address carrying a one-time code and the same state. The app checks that state matches the one it stored, which blocks forged requests.
  5. 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.
  6. 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.0OAuth 2.0
StandardRFC 5849 (2010)RFC 6749 (2012), replaces 1.0
Protecting requestsThe app signs every requestHTTPS protects the connection
What the app sendsSigned request with secretsA bearer access token
Getting a new tokenNot part of the standardRefresh tokens
Used by DiscordNoYes

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.

Questions people ask

Does Discord have OAuth?

Yes. Discord supports OAuth2 with the authorization code grant, the implicit grant and the client credentials grant, plus special flows for adding bots and webhooks. Every app made in the Developer Portal has a client ID for it.

What is the difference between OAuth and OAuth2?

OAuth 1.0 (RFC 5849, 2010) had the app sign every request with its secret. OAuth 2.0 (RFC 6749) replaced it in 2012: it relies on HTTPS instead of per-request signatures and uses bearer access tokens, with separate flows for websites, apps and servers. Discord uses OAuth2.

Does a Discord OAuth app get my password?

No. You sign in on discord.com, not on the app's site. The app only receives a code it swaps for an access token, and that token can only do what the permissions on the Authorize screen allowed.

How do I remove an app I authorized on Discord?

Open User Settings, then Authorized Apps, and click Deauthorize next to the app. It loses access to your account from then on.

Is authorizing an app the same as adding a bot?

No. Adding a bot uses a shortened OAuth2 flow that puts the bot in a server you manage. Authorizing an app gives it access to parts of your own account. Some links do both in one step.

Set up member restore before you need it.
Free plan: one server, unlimited restorable members.