hoodiehq / hoodie-account-client

:dog: Account client API for the browser
https://hoodiehq.github.io/hoodie-account-client
Apache License 2.0
11 stars 24 forks source link

Implement account.hasInvalidSession() #56

Closed gr2m closed 8 years ago

gr2m commented 8 years ago

If a session gets invalidated, "unauthenticate" events get triggered, for example when account.fetch() is called. Once unauthenticated, account.isUnauthenticated shall return true, otherwise false. The unauthenticate state shall also be persisted in localStorage.

account.signIn with the same username creates a new valid session and emits the reauthenticate event