From f9c3448b8636a17bcb097ee5f04f5ce535878576 Mon Sep 17 00:00:00 2001 From: AMAICDAX Date: Wed, 3 Sep 2025 11:52:04 +0200 Subject: [PATCH] add console.log --- controllers/linkedin.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/controllers/linkedin.js b/controllers/linkedin.js index 10d5b03..ad48960 100644 --- a/controllers/linkedin.js +++ b/controllers/linkedin.js @@ -37,8 +37,6 @@ 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 @@ -48,6 +46,8 @@ const handleCallback = async (req, res) => { }, }); + console.log("Profile response:", profileResponse.data); // Log the entire profile response + const emailResponse = await axios.get( "https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))", { @@ -57,6 +57,8 @@ const handleCallback = async (req, res) => { } ); + console.log("Email response:", emailResponse.data); // Log the entire email response + // Stocke dans la session req.session.user = { accessToken,