keratin / authn-js

JavaScript client library for Keratin AuthN
GNU Lesser General Public License v3.0
45 stars 20 forks source link

expose `restoreSession` as public method #16

Closed cainlevy closed 7 years ago

cainlevy commented 7 years ago

Currently, the setFooStore config method will also attempt to restore a session and possibly contact AuthN to refresh. With v0.9.0 it returns a promise that a host app can use to trigger business logic.

This makes the mixture of configuration and side effects awkward, and also introduces an order-of-operations problem where setHost must be configured before setFooStore can operate reliably.

Solution: extract restoreSession() into an explicit public method.