3.2.0 • Published 7 years ago

loopback-component-oauth2 v3.2.0

Weekly downloads
596
License
MIT
Repository
github
Last release
7 years ago

loopback-component-oauth2

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 as usual:

$ npm install loopback-component-oauth2

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.

Example

This example demonstrates how to implement an OAuth service provider, complete with protected API access.

3.2.0

7 years ago

3.1.0

8 years ago

3.0.0

8 years ago

2.5.1

9 years ago

2.5.0

9 years ago

2.4.1

9 years ago

2.4.0

9 years ago

2.3.7

9 years ago

2.3.6

10 years ago

2.3.5

10 years ago

2.3.4

10 years ago

2.3.3

10 years ago

2.3.2

10 years ago

2.3.1

10 years ago

2.3.0

10 years ago

2.2.1

10 years ago

2.2.0

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

2.0.0

10 years ago

2.0.0-rc3

10 years ago

2.0.0-rc2

10 years ago

2.0.0-rc1

10 years ago

2.0.0-beta9

10 years ago

2.0.0-beta8

10 years ago

2.0.0-beta7

10 years ago

2.0.0-beta6

10 years ago

2.0.0-beta5

10 years ago

2.0.0-beta4

10 years ago

2.0.0-beta3

10 years ago

2.0.0-beta2

10 years ago

2.0.0-beta1

10 years ago

1.0.0

11 years ago

1.0.0-beta1

11 years ago