ng-oidc

1.3.2 • Public • Published

ngOidc

Library to provide OpenID Connect (OIDC) and OAuth2 protocol support for client-side, browser-based JavaScript client Angularjs applications. Also included is support for user session and access token management.

Getting started

To install ngOidc use npm

npm install ng-oidc --save

Inject the $oidc-provider to setup the library while configuring your angular-application

var app = angular.module('myApp', ['ngOidc'], function($oidc) {
  $oidc.configure(
    {
      authority: 'http://....',
      client_id: 'abcd...',
      ...
    }
  );
}
);

Sample

There is a sample in the sample Folder.

SignIn Method Sample

Redirects the user to OpenId Page.

 $oidc.signinRedirect();

UserSignedOut Event Sample

Data Is A Function To Run For Event.

 $oidc.addUserSignedOut(data);

Running the Sample

npm start

and then browse to http://localhost:5000.

Compatibility

This library has been tested and intensively used with the IdentityServer4. Please see Thinktecture IdentityServer4 for further details.

Docs

Some initial docs are here.

Feedback, Feature requests, and Bugs

All are welcome on the issue tracker.

Package Sidebar

Install

npm i ng-oidc

Weekly Downloads

0

Version

1.3.2

License

MIT

Unpacked Size

3.7 MB

Total Files

5

Last publish

Collaborators

  • abdollahzadehghalejoghi