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,