Skip to content

Releases: hoodiehq/hoodie-account-client

v6.0.2

31 May 16:56
Compare
Choose a tag to compare

<a name"6.0.2">

6.0.2 (2017-05-31)

Bug Fixes

  • prevent signIn if session present (a2bd802a)

v6.0.1

11 Apr 05:03
Compare
Choose a tag to compare

<a name"6.0.1">

6.0.1 (2017-04-11)

Bug Fixes

  • reauthenticate an expired session after successful account fetch (#149) (e3398298)

v6.0.0

09 Mar 08:38
Compare
Choose a tag to compare

<a name"6.0.0">

6.0.0 (2017-03-09)

Features

Breaking Changes

  • account.ready has been removed. All APIs are now asynchronous, no setup is needed any longer

    (22d8c159)

  • account.fetch() and account.profile.fetch() have been removed. Use account.get() and account.profile.get() instead

    (e5c1af20)

  • account.profile.get() returns a promise now. It also sends a request
    to the server requesting the current user’s profile properties unless
    options.local is set to true

    (188300a2)

  • account.get() returns a promise now. It also sends a request to the server requested the current user’s account properties unless one of the following conditions is true

  1. User is signed out
  2. Only id and or session properties are requested
  3. options.local is set to true

(99d080ef)

  • account.hasInvalidSession() has been removed. Use account.get('session.invalid') instead.

    (0a998f7d)

  • account.isSignedIn() has been removed. Use account.get('session') instead.

    (c2a87220)

v5.1.1

02 Feb 20:02
Compare
Choose a tag to compare

<a name"5.1.1">

5.1.1 (2017-02-02)

Bug Fixes

  • account.profile.get(unknown) returns undefined not {} (1cc2edc9)

v5.1.0

25 Jan 21:39
Compare
Choose a tag to compare

<a name"5.1.0">

5.1.0 (2017-01-25)

Features

v5.0.0

23 Dec 04:24
Compare
Choose a tag to compare

<a name"5.0.0">

5.0.0 (2016-12-23)

Features

Breaking Changes

  • As part of our effort to make Hoodie Client compatible with Service Worker and other environments that do not have access to localStorage, we have to make the Account Client compatible with async store APIs. That means we can’t load the current account state synchronously, so this is no longer be possible:
var account = new Account({
  url: /api
})
if (account.isSignedIn()) {
  sayHi(account.username)
}

Starting with this release, you have to wrap the synchronous methods and properties into account.ready.then()

account.ready.then(function () {
  if (account.isSignedIn()) {
    sayHi(account.username)
  }
})

By default, the account will still use localStorage (via humble-localstorage) to persist its state, but it will now be made asynchronous. In order to use another storage a new options.cache argument can be passed to the Account constructor:

var account = new Account({
  url: /api,
  cache: {
    set: writeAccountState
    get: getAccountState,
    unset: clearAccountState,
  }
})

All three options.cache methods must return promises. options.cache.get must resolve with the persisted account properties or an empty object.

(962841a2)

The pre:* and post:* events introduced in #65 have now been removed in favor of a proper account.hook.{before,after} API. See https://github.com/hoodiehq/hoodie-account-client#hooks for more details.

This is not technically a breaking change as the pre:* and post:* events have not been documented, but as they are used by @hoodie/client we decided to make this a breaking change nevertheless

(72f79c20)

v4.4.0

08 Oct 03:44
Compare
Choose a tag to compare

<a name"4.4.0">

4.4.0 (2016-10-08)

Features

v4.3.0

29 Sep 19:28
Compare
Choose a tag to compare

<a name"4.3.0">

4.3.0 (2016-09-29)

Features

v4.2.0

11 Aug 04:38
Compare
Choose a tag to compare

<a name"4.2.0">

4.2.0 (2016-08-11)

Features

  • new Account accepts url as string (50e174c3)

v4.1.1

08 Aug 15:40
Compare
Choose a tag to compare

<a name"4.1.1">

4.1.1 (2016-08-08)

Bug Fixes

  • admin.signOut() throws error when signed out (395e60d8)