Skip to content

Commit

Permalink
fix: remove unused state option in exchangeWebFlowCode() (#52)
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Balayan <roman.balayan@paymaya.com>
  • Loading branch information
romanbalayan and Roman Balayan committed Oct 11, 2021
1 parent 4d86a2d commit ceb5ee8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,17 +459,6 @@ Options
The <code>redirectUrl</code> option you passed to <a href="#getwebflowauthorizationurl"><code>getWebFlowAuthorizationUrl()</code></a>
</td>
</tr>
<tr>
<th>
<code>state</code>
</th>
<th>
<code>string</code>
</th>
<td>
The <code>state</code> option you passed to <a href="#getwebflowauthorizationurl"><code>getWebFlowAuthorizationUrl()</code></a>
</td>
</tr>
<tr>
<th>
<code>request</code>
Expand Down
3 changes: 0 additions & 3 deletions src/exchange-web-flow-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export type ExchangeWebFlowCodeOAuthAppOptions = {
clientSecret: string;
code: string;
redirectUrl?: string;
state?: string;
request?: RequestInterface;
};
export type ExchangeWebFlowCodeGitHubAppOptions = {
Expand All @@ -27,7 +26,6 @@ export type ExchangeWebFlowCodeGitHubAppOptions = {
clientSecret: string;
code: string;
redirectUrl?: string;
state?: string;
request?: RequestInterface;
};

Expand Down Expand Up @@ -77,7 +75,6 @@ export async function exchangeWebFlowCode(
client_secret: options.clientSecret,
code: options.code,
redirect_uri: options.redirectUrl,
state: options.state,
}
);

Expand Down
10 changes: 0 additions & 10 deletions test/exchange-web-flow-code.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ describe("exchangeWebFlowCode()", () => {
client_id: "1234567890abcdef1234",
client_secret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
},
}
);
Expand All @@ -31,7 +30,6 @@ describe("exchangeWebFlowCode()", () => {
clientId: "1234567890abcdef1234",
clientSecret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
request: request.defaults({
headers: {
"user-agent": "test",
Expand Down Expand Up @@ -78,7 +76,6 @@ describe("exchangeWebFlowCode()", () => {
client_id: "1234567890abcdef1234",
client_secret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
},
}
);
Expand All @@ -88,7 +85,6 @@ describe("exchangeWebFlowCode()", () => {
clientId: "1234567890abcdef1234",
clientSecret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
request: request.defaults({
headers: {
"user-agent": "test",
Expand Down Expand Up @@ -138,7 +134,6 @@ describe("exchangeWebFlowCode()", () => {
client_id: "1234567890abcdef1234",
client_secret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
redirect_uri: "https://acme-inc.com/login",
},
}
Expand All @@ -149,7 +144,6 @@ describe("exchangeWebFlowCode()", () => {
clientId: "1234567890abcdef1234",
clientSecret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
redirectUrl: "https://acme-inc.com/login",
request: request.defaults({
headers: {
Expand Down Expand Up @@ -198,7 +192,6 @@ describe("exchangeWebFlowCode()", () => {
client_id: "lv1.1234567890abcdef",
client_secret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
redirect_uri: "https://acme-inc.com/login",
},
}
Expand All @@ -209,7 +202,6 @@ describe("exchangeWebFlowCode()", () => {
clientId: "lv1.1234567890abcdef",
clientSecret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
redirectUrl: "https://acme-inc.com/login",
request: request.defaults({
headers: {
Expand Down Expand Up @@ -265,7 +257,6 @@ describe("exchangeWebFlowCode()", () => {
client_id: "lv1.1234567890abcdef",
client_secret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
},
}
);
Expand All @@ -275,7 +266,6 @@ describe("exchangeWebFlowCode()", () => {
clientId: "lv1.1234567890abcdef",
clientSecret: "1234567890abcdef12347890abcdef12345678",
code: "code123",
state: "state123",
request: request.defaults({
headers: {
"user-agent": "test",
Expand Down

0 comments on commit ceb5ee8

Please sign in to comment.