oidc-web
v0.4.1
Published
Authentication library for Solid clients based on OAuth2/OpenID Connect
Downloads
7
Maintainers
Readme
OpenID Connect Web Client (oidc-web)
OIDC (OpenID Connect) authentication client for web browsers (Relying Party wrapper)
Authentication client for use in browser-based JS applications.
Table of Contents
Background
Install
$ npm install oidc-web
Usage
const { OIDCWebClient } = require('oidc-web')
let auth = new OIDCWebClient({})
auth.login(issuer)
.then(session => {
// logged in session or null
})
// On Document Ready (or on web framework ready) event:
auth.currentSession()
.then(session => {
if (session) {
// logged in
} else {
console.log('please log in')
}
})
Develop
Install
git clone https://github.com/solid/oidc-web.git
cd oidc-web
npm install
Test
$ npm test
Coverage
$ npm run coverage
API
tbd
Code of conduct
This project follows the Contributor Covenant Code of Conduct.