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
[x] claim this issue (comment below or assign yourself) (@toh82)
[x] start a PR (#72)
[x] add unit tests for account.hasInvalidSession()
[x] implement account.hasInvalidSession(), and persist the unauthenticate state in localStorage
[x] update README (add account.hasInvalidSession and remove issue reference in Events)
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 thereauthenticate
eventaccount.hasInvalidSession()
account.hasInvalidSession()
, and persist the unauthenticate state in localStorageaccount.hasInvalidSession
and remove issue reference in Events)