Skip to content

Commit

Permalink
fix(OAuth2): scope can be optional / not required
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This removes the `scope` property from the authorization
code flow, as it is not expected there.

Reference: discord/discord-api-docs@5796503
  • Loading branch information
vladfrangu committed Apr 10, 2021
1 parent 6e9c820 commit bbe56a9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rest/v8/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export interface RESTPostOAuth2AccessTokenURLEncodedData {
grant_type: 'authorization_code';
code: string;
redirect_uri?: string;
scope: string;
}

/**
Expand All @@ -80,7 +79,7 @@ export interface RESTPostOAuth2RefreshTokenURLEncodedData {
grant_type: 'refresh_token';
refresh_token: string;
redirect_uri?: string;
scope: string;
scope?: string;
}

export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult;
Expand Down

0 comments on commit bbe56a9

Please sign in to comment.