0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/connectors/connector-discord
2024-07-20 22:04:56 +08:00
..
src refactor: use vitest for connectors (#5562) 2024-03-28 10:21:50 +08:00
CHANGELOG.md release: version packages (#5987) 2024-07-06 09:07:56 +08:00
logo.svg refactor: add connector packages 2023-04-01 15:53:14 +08:00
package.json chore(deps): upgrade typescript 2024-07-20 22:04:56 +08:00
README.md feat(connector): make official connectors scope configurable (#3723) 2023-04-23 16:56:07 +08:00

Discord OAuth2 Connector

The Discord connector provides a way for your application to use Discord as an authorization system.

Table of contents

Register a developer application

  • Visit Discord Developer Portal and sign in with your Discord account.
  • Click the New Application button to create an application, choose a name for it (Ex: LogtoAuth), tick the box and click Create.
  • Go to OAuth2 page and click Reset Secret
  • Take note of the CLIENT ID and CLIENT SECRET fields
  • Add the valid redirects (Ex: http://auth.mycompany.io/callback/${connector_id}). The connector_id can be found on the top bar of the Logto Admin Console connector details page.

Configure Logto

Config types

Name Type
clientId string
clientSecret string
scope string

clientId

clientId is the CLIENT ID field we saved earlier. (You can find it in the Oauth2 Page in Discord Developer Portal.)

clientSecret

clientSecret is the CLIENT SECRET we saved earlier. (If you've lost it you need to click Reset Secret)

scope

scope is the permissions granted by the user's authorization. The default value is identify email. You can see the full list of scopes here.