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

passport-bitbucket-token

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-bitbucket-token

Passport strategy for authenticating with Bitbucket access tokens using the OAuth 2.0 API.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-34.78%
Maintainers
2
Weekly downloads
 
Created
Source

passport-bitbucket-token

NPM

Build Status Coverage Status Dependency Status Code Climate npm version License

Passport strategy for authenticating with Bitbucket access tokens using the OAuth 2.0 API.

Library is inspired by passport-facebook-token.

Installation

npm install passport-bitbucket-token

Usage

Configure Strategy

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

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.

Keywords

FAQs

Package last updated on 03 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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