Skip to content

Commit a1d2c77

Browse files
authored
Merge pull request #1 from elkmod/patch-1
Remove redundant client id from auth.
2 parents 1ea150b + 0e9aa0a commit a1d2c77

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ export async function createFromIntegration(url, id, secret, version) {
3636
try {
3737
res = await axios.post(`${url}/api/oauth/token`, {
3838
client_id: id,
39-
grant_type: "client_credentials",
40-
client_id: id,
41-
client_secret: secret
39+
client_secret: secret,
40+
grant_type: "client_credentials"
4241
});
4342
} catch(err) {
4443
if (err.response.status === 401) {
@@ -52,4 +51,4 @@ export async function createFromIntegration(url, id, secret, version) {
5251
await api._initialize();
5352

5453
return api;
55-
}
54+
}

0 commit comments

Comments
 (0)