scope change
This commit is contained in:
parent
1b77fdf39d
commit
5c5f1d06ae
1 changed files with 5 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ const querystring = require("querystring");
|
||||||
const clientId = "780w7gsy8eysmj";
|
const clientId = "780w7gsy8eysmj";
|
||||||
const clientSecret = "WPL_AP1.w6OTTkAndAdT3PYF.UZEcwQ==";
|
const clientSecret = "WPL_AP1.w6OTTkAndAdT3PYF.UZEcwQ==";
|
||||||
const redirectUri = "http://localhost:4200/api/auth/linkedin/callback";
|
const redirectUri = "http://localhost:4200/api/auth/linkedin/callback";
|
||||||
const scope = "r_liteprofile r_emailaddress";
|
const scope = "openid profile email";
|
||||||
|
|
||||||
let accessToken = "";
|
let accessToken = "";
|
||||||
|
|
||||||
|
|
@ -42,6 +42,10 @@ const handleCallback = async (req, res) => {
|
||||||
"Authentication successful! You can now retrieve your profile information."
|
"Authentication successful! You can now retrieve your profile information."
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.error(
|
||||||
|
"LinkedIn token error:",
|
||||||
|
error.response ? error.response.data : error.message
|
||||||
|
);
|
||||||
res.status(500).send("Error retrieving access token.");
|
res.status(500).send("Error retrieving access token.");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue