Gathering detailed insights and metrics for passport-linked-in-token
Gathering detailed insights and metrics for passport-linked-in-token
Gathering detailed insights and metrics for passport-linked-in-token
Gathering detailed insights and metrics for passport-linked-in-token
npm install passport-linked-in-token
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9 Commits
3 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Dec 16, 2015
Latest Version
1.0.1
Package Id
passport-linked-in-token@1.0.1
Size
4.59 kB
NPM Version
2.14.7
Node Version
4.2.1
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
Passport strategy for authenticating with LinkedIn access tokens using the OAuth 2.0 API.
This module lets you authenticate using LinkedIn in your Node.js applications. By plugging into Passport, LinkedIn authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.
1npm install passport-linked-in-token
The LinkedIn authentication strategy authenticates users using a LinkedIn account and OAuth 2.0 tokens.
The strategy requires a verify
callback, which accepts these credentials and calls next
providing a user, as well as options
specifying a app ID and app secret.
1var LinkedInTokenStrategy = require('passport-linkedin-token'); 2 3passport.use(new LinkedInTokenStrategy({ 4 clientID: LINKEDIN_ID, 5 clientSecret: LINKEDIN_SECRET, 6 scope: ['r_emailaddress', 'r_basicprofile'], 7 profileFields: ['educations', 'courses'], 8 passReqToCallback: true 9}, function(req, accessToken, refreshToken, profile, next) { 10 User.findOrCreate({'linkedin.id': profile.id}, function(error, user) { 11 return next(error, user); 12 }); 13}));
Use passport.authenticate()
, specifying the linkedin-token
strategy, to authenticate requests.
For example, as route middleware in an Express application:
1app.get('/auth/linkedin', passport.authenticate('linkedin-token'));
Or if you are using Sails framework:
1// AuthController.js 2module.exports = { 3 linkedin: function(req, res) { 4 passport.authenticate('linkedin-token', function(error, user, info) { 5 if (error) return res.serverError(error); 6 if (info) return res.unauthorized(info); 7 return res.ok(user); 8 })(req, res); 9 } 10};
The request to this route should include GET or POST data with the keys oauth2_access_token
and optionally, refresh_token
set to the credentials you receive from LinkedIn.
GET /auth/linkedin?oauth2_access_token=<LINKEDIN_TOKEN>
The MIT License (MIT)
Copyright (c) 2015 Andrew Orel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
Found 0/9 approved changesets -- score normalized to 0
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
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
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