GuidesEspañolContact

Login with Discord on your website

Login with Discord lets your members sign in to your website with their Discord account, with no new password. It runs on OAuth2, Discord’s official system: the person approves which data they share, and your site receives their name, their avatar and, if you ask for it, which servers they are in and which roles they have in yours.

  • ⏱ 2 min read
  • 5 sections
  • 2 diagrams

Updated:

How it works, step by step

For the person using it, it takes three clicks:

  • Click "Login with Discord" on your site.
  • Discord shows which app is asking for access and which data it will share.
  • Click "Authorize" and land back on your site, signed in.
Four steps of Login with Discord: the website, Discord’s screen with the data being shared, the authorization and the return to the site with name, avatar and roles.
Three clicks and no new passwords.

Which data you can ask for

Discord works with permissions called scopes, and the person sees on screen which ones you ask for. The right approach is to ask only for what you need. The usual ones are:

  • identify: the username, avatar and account ID.
  • email: the email address, only if you really need it.
  • guilds: the list of servers they are in.
  • guilds.members.read: their member data in your server, including their roles.
Discord authorize screen asking to see the username and avatar, the servers and member info, with the identify, guilds and guilds.members.read scopes pointed out.
People see and approve every piece of data they share.

What you can do with it

Once the site knows who each person is, a lot opens up:

  • Private areas: content only for members, subscribers or a specific role.
  • A dashboard for your bot: admins change its settings from the website.
  • Leaderboards, profiles or server stats, with everyone’s name and avatar.
  • A store: sell roles or memberships and deliver them instantly on Discord.
  • Linked Roles: Discord lets your site grant roles based on outside data.

What to watch out for

Security depends on how it is built. The app secret must never be in code the browser can see, sessions should expire, and the role check must happen on the server, not only on the page. And do not store more data than you need.

A real example

On the East & Eden web panel, the team signs in with their Discord account and the panel checks that the account has admin access before showing anything. That way the community manages its bots from a single page, with no shared passwords. The Askor panel works the same way, with its own list of admins.

Your checklist

0/4

Tick what you already have. It stays saved in this browser.

Was this guide useful?

Frequently asked questions

Is it safe for my members?

Yes, when it is built properly. People never type their Discord password on your site: they type it on Discord, and your site only receives the data they approve.

Can I see someone’s password or messages?

No. Login with Discord gives no access to passwords or private messages, only to the data covered by the scopes you request.

Do I need a bot to check roles?

Not always. With the guilds.members.read scope the site can read the person’s roles in your server. To give or remove roles you do need a bot inside the server.

Can it be added to a website I already have?

Usually yes, though it depends on how the site is built. I review it and confirm the scope and the price before starting.

Need a hand with this?

Message me on Discord or WhatsApp. I reply in under 24 hours.

Link copied