ng-oidc
v1.3.2
Published
OpenID Connect (OIDC) & OAuth2 client library For AngularJS
Downloads
12
Maintainers
Readme
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.