@logto/connector-discord 1.0.0-beta.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,18 +3,19 @@
3
3
  The Discord connector provides a way for your application to use Discord as an authorization system.
4
4
 
5
5
  **Table of contents**
6
- - [Register a developer application](#register-a-developer-application)
7
- - [Configure Logto](#configure-logto)
8
- - [Config types](#config-types)
9
- - [clientId](#clientid)
10
- - [clientSecret](#clientseceret)
6
+ - [Discord OAuth2 Connector](#discord-oauth2-connector)
7
+ - [Register a developer application](#register-a-developer-application)
8
+ - [Configure Logto](#configure-logto)
9
+ - [Config types](#config-types)
10
+ - [clientId](#clientid)
11
+ - [clientSecret](#clientsecret)
11
12
 
12
13
  ## Register a developer application
13
14
  - Visit [Discord Developer Portal](https://discord.com/developers/applications) and sign in with your Discord account.
14
15
  - Click the **New Application** button to create an application, choose a name for it (Ex: LogtoAuth), tick the box and click **Create**.
15
16
  - Go to **OAuth2** page and click **Reset Secret**
16
17
  - Take note of the **CLIENT ID** and **CLIENT SECRET** fields
17
- - Add the valid redirects (Ex: **`http://auth.mycompany.io/callback/discord-universal`**)
18
+ - 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.
18
19
 
19
20
 
20
21
  ## Configure Logto
@@ -32,4 +33,4 @@ The Discord connector provides a way for your application to use Discord as an a
32
33
 
33
34
  #### clientSecret
34
35
  `clientSecret` is the `CLIENT SECRET` we saved earlier.
35
- (If you've lost it you need to click **Reset Secret**)
36
+ (If you've lost it you need to click **Reset Secret**)
@@ -1,4 +1,4 @@
1
- import { ConnectorMetadata } from '@logto/connector-kit';
1
+ import type { ConnectorMetadata } from '@logto/connector-kit';
2
2
  /**
3
3
  * Base authorization URL.
4
4
  * https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-urls
@@ -2,8 +2,8 @@
2
2
  * Discord OAuth2 Connector
3
3
  * https://discord.com/developers/docs/topics/oauth2
4
4
  */
5
- import { CreateConnector, SocialConnector } from '@logto/connector-kit';
6
- import { DiscordConfig } from './types';
5
+ import type { CreateConnector, SocialConnector } from '@logto/connector-kit';
6
+ import type { DiscordConfig } from './types.js';
7
7
  export declare const getAccessToken: (config: DiscordConfig, codeObject: {
8
8
  code: string;
9
9
  redirectUri: string;