From 03201fe9c0cea9edbf01d6b3cf70da610430ae34 Mon Sep 17 00:00:00 2001 From: AMAICDAX Date: Wed, 3 Sep 2025 11:50:26 +0200 Subject: [PATCH] modif --- controllers/linkedin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/linkedin.js b/controllers/linkedin.js index 6b0161e..10d5b03 100644 --- a/controllers/linkedin.js +++ b/controllers/linkedin.js @@ -6,7 +6,7 @@ const querystring = require("querystring"); const clientId = "780w7gsy8eysmj"; const clientSecret = "WPL_AP1.w6OTTkAndAdT3PYF.UZEcwQ=="; const redirectUri = "http://localhost:4200/api/auth/linkedin/callback"; -const scope = "r_liteprofile r_emailaddress"; +const scope = "openid profile email"; let accessToken = ""; @@ -37,6 +37,8 @@ const handleCallback = async (req, res) => { }) ); + console.log("Token response:", tokenResponse.data); // Log the entire response + const accessToken = tokenResponse.data.access_token; // Récupère les infos utilisateur