Gathering detailed insights and metrics for passport-linkedin-token-v2
Gathering detailed insights and metrics for passport-linkedin-token-v2
Gathering detailed insights and metrics for passport-linkedin-token-v2
Gathering detailed insights and metrics for passport-linkedin-token-v2
npm install passport-linkedin-token-v2
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
9 Commits
2 Forks
1 Branches
2 Contributors
Updated on May 29, 2019
Latest Version
1.0.1
Package Id
passport-linkedin-token-v2@1.0.1
Unpacked Size
10.64 kB
Size
3.69 kB
File Count
6
NPM Version
6.4.1
Node Version
10.11.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
Passport strategy for authenticating with LinkedIn OAuth2 tokens. It works for lite profile and email addresses.
$ npm install passport-linkedin-token-v2
This LinkedIn authentication strategy authenticates users using a LinkedIn account and OAuth 2.0 authorization code. The strategy requires a verify callback, which accepts these credentials and calls done with the following options:
passport.use(
"candidate-linkedin",
new LinkedInTokenStrategy(
{
clientID: env.LinkedInClientID,
clientSecret: env.LinkedInClientSecret,
redirectURL: env.LinkedInRedirectURL,
scope: ["r_emailaddress", "r_liteprofile"]
},
async (req, accessToken, refreshToken, profile, done) => {
User.findOrCreate({ linkedinId: profile.id }, function (err, user) {
return done(err, user);
});
})
)
The react-linkedin-login-oauth2 package is used to get authorization code for Linked In Log in feature using OAuth2 in a easy way, without redirecting your application to linked in authorization page. After have the authorization code, you can send it to server to continue to get information needed. They have a cool demo as well as source code if you get stuck.
You can send the Authorization Code as an access_token
to the Passport Strategy
Client
linkedinResponse = async response => {
const { data: loginDetails } = await axios.post(
"http://localhost:3030/api/auth/candidate/linkedin/login",
{
access_token: response.code
}
);
console.log(loginDetails);
};
render() {
return (
<LinkedIn
clientId="817XXXXXXXXr33"
scope="r_liteprofile r_emailaddress"
onFailure={this.linkedinResponse}
onSuccess={this.linkedinResponse}
redirectUri={`http://localhost:3000/api/auth/linkedin/callback`}
/>
);
}
Server
passport.authenticate(
"candidate-linkedin",
{ session: false },
(error, user) => {
// Your Logic to authenticate requests
})
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker, You can mail me such security vulnerabilities at nkashter[at]gmail.com. The Responsible Disclosure Program details the procedure for disclosing security issues.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 1/7 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More