[PR #4717] [MERGED] feat(discord): allow specification of permissions #5546

Closed
opened 2026-03-13 12:26:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4717
Author: @TheUntraceable
Created: 9/17/2025
Status: Merged
Merged: 9/18/2025
Merged by: @himself65

Base: canaryHead: feat/discord-bot-permissions


📝 Commits (7)

  • d40c280 feat: add Discord bot permissions parameter support
  • 24d1af0 chore: format file
  • ae885c7 docs: enhance Discord authentication documentation with usage examples and additional options
  • 77bec13 Fix grammar in documentation
  • 6f5686d Make sure permissions is undefined, not just falsey
  • 59557c3 Use right number for permissions
  • 01de37c Use correct number for permissions

📊 Changes

3 files changed (+253 additions, -48 deletions)

View changed files

📝 docs/content/docs/authentication/discord.mdx (+42 -16)
📝 docs/content/docs/concepts/oauth.mdx (+201 -30)
📝 packages/better-auth/src/social-providers/discord.ts (+10 -2)

📄 Description

Reopening of #3163 as I was told it was closed by mistake.


Summary by cubic

Adds a new permissions option to the Discord provider so apps can request specific bot permissions during OAuth. Updates docs with a clear Provider Options guide and Discord examples, including bot permission setup.

  • New Features
    • Discord provider: add permissions?: number to include &permissions=... when the bot scope is used. No breaking changes.
    • Docs: new Provider Options section with examples; Discord docs reorganized with Usage and an example showing permissions and the bot scope requirement.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4717 **Author:** [@TheUntraceable](https://github.com/TheUntraceable) **Created:** 9/17/2025 **Status:** ✅ Merged **Merged:** 9/18/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `feat/discord-bot-permissions` --- ### 📝 Commits (7) - [`d40c280`](https://github.com/better-auth/better-auth/commit/d40c280c68426c4fd4130a26cb49c84aa0864859) feat: add Discord bot permissions parameter support - [`24d1af0`](https://github.com/better-auth/better-auth/commit/24d1af058253e35c78101db10ef347677185d110) chore: format file - [`ae885c7`](https://github.com/better-auth/better-auth/commit/ae885c764ee210980435e3d18cf0570fde4cab2e) docs: enhance Discord authentication documentation with usage examples and additional options - [`77bec13`](https://github.com/better-auth/better-auth/commit/77bec1322d46e9a72745bb2c1a823e9e306e2884) Fix grammar in documentation - [`6f5686d`](https://github.com/better-auth/better-auth/commit/6f5686df3625e8eb769b263f9ba94894c2353257) Make sure permissions is undefined, not just falsey - [`59557c3`](https://github.com/better-auth/better-auth/commit/59557c3d2f6116fe3375490ffd6a02896838733e) Use right number for permissions - [`01de37c`](https://github.com/better-auth/better-auth/commit/01de37c5631621c527e4d94b25d468dac2398416) Use correct number for permissions ### 📊 Changes **3 files changed** (+253 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/authentication/discord.mdx` (+42 -16) 📝 `docs/content/docs/concepts/oauth.mdx` (+201 -30) 📝 `packages/better-auth/src/social-providers/discord.ts` (+10 -2) </details> ### 📄 Description Reopening of #3163 as I was told it was closed by mistake. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a new permissions option to the Discord provider so apps can request specific bot permissions during OAuth. Updates docs with a clear Provider Options guide and Discord examples, including bot permission setup. - **New Features** - Discord provider: add permissions?: number to include &permissions=... when the bot scope is used. No breaking changes. - Docs: new Provider Options section with examples; Discord docs reorganized with Usage and an example showing permissions and the bot scope requirement. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:26:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#5546