[PR #3163] [CLOSED] feat: add Discord bot permissions parameter support #12927

Closed
opened 2026-04-13 08:40:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3163
Author: @TheUntraceable
Created: 6/24/2025
Status: Closed

Base: v1.3Head: feat/discord-bot-permissions


📝 Commits (3)

  • d40c280 feat: add Discord bot permissions parameter support
  • 24d1af0 chore: format file
  • ae885c7 docs: enhance Discord authentication documentation with usage examples and additional options

📊 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

When using the Discord social plugin, you can set the bot scope, and this scope can have an additional permissions scope, referring to the permissions of the Discord Bot once authorized.
This pull request introduces enhancements to the discord social provider in the packages/better-auth module. The changes add support for specifying Discord bot permissions during OAuth authorization, improving flexibility for integrations that require bot capabilities.

Enhancements to Discord social provider:


🔄 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/3163 **Author:** [@TheUntraceable](https://github.com/TheUntraceable) **Created:** 6/24/2025 **Status:** ❌ Closed **Base:** `v1.3` ← **Head:** `feat/discord-bot-permissions` --- ### 📝 Commits (3) - [`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 ### 📊 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 When using the Discord social plugin, you can set the `bot` scope, and this scope can have an additional `permissions` scope, referring to the permissions of the Discord Bot once authorized. This pull request introduces enhancements to the `discord` social provider in the `packages/better-auth` module. The changes add support for specifying Discord bot permissions during OAuth authorization, improving flexibility for integrations that require bot capabilities. ### Enhancements to Discord social provider: * [`packages/better-auth/src/social-providers/discord.ts`](diffhunk://#diff-1a21b72f6948f413fefe8849f8fca8de99aa80f652eecaa356a8d34372010d7eR78): Added a new optional `permissions` property to the `DiscordOptions` interface, allowing developers to specify bot permissions during OAuth authorization. * [`packages/better-auth/src/social-providers/discord.ts`](diffhunk://#diff-1a21b72f6948f413fefe8849f8fca8de99aa80f652eecaa356a8d34372010d7eR89-R100): Updated the `discord` function to append a `permissions` parameter to the authorization URL when the `bot` scope is included and `permissions` is defined. This ensures bot permissions are correctly passed during the OAuth flow. --- <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-04-13 08:40:00 -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#12927