Skip to content

Commit

Permalink
fix: linkedin api version increment (#2667)
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalmnt committed Jul 2, 2024
1 parent ed5ace6 commit 8682698
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion platforms/src/Linkedin/Providers/linkedin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const verifyLinkedin = async (code: string): Promise<LinkedinFindMyUserResponse>
// retrieve user's auth bearer token to authenticate client
const accessToken = await requestAccessToken(code);
// Now that we have an access token fetch the user details
const userRequest = await axios.get("https://api.linkedin.com/rest/me", {
const userRequest = await axios.get("https://api.linkedin.com/v2/me", {
headers: {
Authorization: `Bearer ${accessToken}`,
"Linkedin-Version": 202305,
Expand Down
4 changes: 2 additions & 2 deletions platforms/src/Linkedin/__tests__/linkedin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ beforeEach(() => {
});
});

describe("Attempt verification", function () {
describe("Attempt verification", function() {
it("handles valid verification attempt", async () => {
const clientId = process.env.LINKEDIN_CLIENT_ID;
const clientSecret = process.env.LINKEDIN_CLIENT_SECRET;
Expand All @@ -62,7 +62,7 @@ describe("Attempt verification", function () {
);

// Check the request to get the user
expect(mockedAxios.get).toHaveBeenCalledWith("https://api.linkedin.com/rest/me", {
expect(mockedAxios.get).toHaveBeenCalledWith("https://api.linkedin.com/v2/me", {
headers: { Authorization: "Bearer 762165719dhiqudgasyuqwt6235", "Linkedin-Version": 202305 },
});

Expand Down

0 comments on commit 8682698

Please sign in to comment.