Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

passport-bitbucket-token

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-bitbucket-token - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "passport-bitbucket-token",
"version": "0.0.2",
"version": "0.0.3",
"description": "Passport strategy for authenticating with Bitbucket access tokens using the OAuth 2.0 API.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

# passport-bitbucket-token
Passport strategy for authenticating with Bitbucket access tokens using the OAuth 2.0 API.
![License](https://img.shields.io/badge/license-MIT-blue.svg)
[Passport](http://passportjs.org/) strategy for authenticating with [Bitbucket](https://bitbucket.org/) access tokens using the OAuth 2.0 API.
Library is inspired by [passport-facebook-token](https://github.com/drudge/passport-facebook-token).
## Installation
`npm install passport-bitbucket-token`
## Usage
### Configure Strategy
```js
var BitbucketTokenStrategy = require('passport-bitbucket-token');
passport.use(new BitbucketTokenStrategy({
clientID: 'app-id',
clientSecret: 'client-secret'
},
function (accessToken, refreshToken, profile, done) {
User.upsertUser(accessToken, refreshToken, profile, function(err, user) {
return done(err, user);
});
}));
```
### Authenticate User
```js
router.route('/auth/bitbucket')
.post(passport.authenticate('bitbucket-token'), function(req, res, next) {
if (!req.user) {
return res.send(401, 'User Not Authenticated');
}
res.send(200);
});
```
# License
passport-bitbucket-token is released under [MIT License](https://opensource.org/licenses/MIT).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc