JSPM

loopback-oauth2orize

2.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q25371F
  • License

OAuth 2.0 provider for LoopBack

Package Exports

  • loopback-oauth2orize

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (loopback-oauth2orize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

loopback-component-oauth2

Forked original repo at 2.0.0-rc3 due to licence change to Strongloop.

The LoopBack oAuth 2.0 component provides full integration between OAuth 2.0 and LoopBack. It enables LoopBack applications to function as an oAuth 2.0 provider to authenticate and authorize client applications and/or resource owners (i.e. users) to access protected API endpoints.

The oAuth 2.0 protocol implementation is based on oauth2orize and passport.

See LoopBack Documentation - OAuth 2.0 Component for more information.

Install

Install the component from this fork:

$ npm install loopback-oauth2orize

Or add to package.json directly:

"loopback-oauth2orize": "git://github.com/ticadia/loopback-oauth2orize.git"

Use

Use in an application as follows:

var oauth2 = require('loopback-component-oauth2');

var options = {
  dataSource: app.dataSources.db, // Data source for oAuth2 metadata persistence
  loginPage: '/login', // The login page url
  loginPath: '/login' // The login form processing url
};

oauth2.oAuth2Provider(
  app, // The app instance
  options // The options
);

The app instance will be used to set up middleware and routes. The data source provides persistence for the oAuth 2.0 metadata models.

For more information, see OAuth 2.0 LoopBack component official documentation.