nodeSolidServer / solid-auth-oidc

OpenID Connect authentication support for the solid-client library
MIT License
11 stars 2 forks source link

Implement loading user credentials from storage #9

Closed dmitrizagidulin closed 4 years ago

dmitrizagidulin commented 7 years ago

Addresses issue #8.

Implements ClientAuthOIDC.from(options) factory method, which loads previously selected provider uri and user credentials from storage. (.for() wasn't used as it was a reserved word).

Usage:

let auth = ClientAuthOIDC.from({})
// credentials / tokens have now been loaded from local storage

auth.currentUser()
  .then(webId => {
    // previously saved web id
  })
dmitrizagidulin commented 7 years ago

cc @dan-f for review.

dmitrizagidulin commented 7 years ago

@dan-f thank you, great feedback.