From ba20974b5f8fe2ee8986c3a8b4aed35e0f9b571d Mon Sep 17 00:00:00 2001 From: Roberto Romero Date: Wed, 7 Sep 2022 17:57:45 +0200 Subject: [PATCH] fix(providers): use `client_secret_post` token auth for LinkedIn (#5236) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Co-authored-by: Balázs Orbán --- packages/next-auth/src/providers/linkedin.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/next-auth/src/providers/linkedin.ts b/packages/next-auth/src/providers/linkedin.ts index 37fa599f99..75247f3c3e 100644 --- a/packages/next-auth/src/providers/linkedin.ts +++ b/packages/next-auth/src/providers/linkedin.ts @@ -31,6 +31,9 @@ export default function LinkedIn

( 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: {