From d404aaadfc9756d553aaa25f73dbeee831e22271 Mon Sep 17 00:00:00 2001 From: Roger Cortez Date: Thu, 11 Jul 2024 14:07:09 +0800 Subject: [PATCH] Udpated scope settings for LinkedIn OAuth url --- server/routes/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/auth.js b/server/routes/auth.js index ce1b412..9f167a9 100644 --- a/server/routes/auth.js +++ b/server/routes/auth.js @@ -69,7 +69,7 @@ router.get('/github/callback', async (req, res) => { router.get('/linkedin', (req, res) => { try { // Need to add the scope w_member_social in order to make posts on behalf of the user - const linkedinAuthUrl = `https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=${LINKEDIN_CLIENT_ID}&redirect_uri=${encodeURIComponent(LINKEDIN_CALLBACK_URL)}&scope=r_liteprofile%20r_emailaddress%20w_member_social`; + const linkedinAuthUrl = `https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=${LINKEDIN_CLIENT_ID}&redirect_uri=${encodeURIComponent(LINKEDIN_CALLBACK_URL)}&scope=openid%20r_liteprofile%20r_emailaddress%20w_member_social`; // extra scope that needs company page verification: %20w_member_social r_liteprofile, r_emailaddress, and w_member_social // &scope=openid%20profile%20email