Skip to content

Commit

Permalink
fix(providers): use client_secret_post token auth for LinkedIn (#5236)
Browse files Browse the repository at this point in the history
* Send client_id and client_secret to linkedin

Linkedin now requires client_id and client_secret to be
sent in the oauth callback. Fixes #5220

* Update linkedin.ts

Co-authored-by: Thang Vu <thvu@hey.com>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
  • Loading branch information
3 people committed Sep 7, 2022
1 parent 14b4ed1 commit ba20974
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/next-auth/src/providers/linkedin.ts
Expand Up @@ -31,6 +31,9 @@ export default function LinkedIn<P extends LinkedInProfile>(
params: { scope: "r_liteprofile r_emailaddress" },
},
token: "https://www.linkedin.com/oauth/v2/accessToken",
client: {
token_endpoint_auth_method: "client_secret_post",
},
userinfo: {
url: "https://api.linkedin.com/v2/me",
params: {
Expand Down

0 comments on commit ba20974

Please sign in to comment.