Skip to content

Commit

Permalink
Merge pull request #11 from port-labs/token_fixes
Browse files Browse the repository at this point in the history
Update getToken.ts
  • Loading branch information
amitb777 authored Sep 6, 2022
2 parents 25aae98 + bd05353 commit b5dd491
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/clients/port/getToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import axios from 'axios';
const getToken = async (baseUrl: string, clientId: string, clientSecret: string): Promise<string> => {
try {
core.info(`Trying to obtain Port access token`);
const { data } = await axios.get(`${baseUrl}/v1/auth/access_token?client_id=${clientId}&client_secret=${clientSecret}`);
const { data } = await axios.post(`${baseUrl}/v1/auth/access_token`, { clientId, clientSecret });

return data.accessToken;
} catch (e: any) {
Expand Down

0 comments on commit b5dd491

Please sign in to comment.