Skip to content

Commit

Permalink
Udpated scope settings for LinkedIn OAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Cortez committed Jul 11, 2024
1 parent 8c86951 commit f38b5c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ 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=openid%20profile%20email`;
// extra scope that needs company page verification: %20w_member_social r_liteprofile, r_emailaddress, and w_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=r_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

res.redirect(linkedinAuthUrl);
} catch (error) {
Expand Down

0 comments on commit f38b5c7

Please sign in to comment.