Skip to content

Releases: AckeeCZ/bear-auth

Bear Auth v2.1.0

17 Dec 10:10
Compare
Choose a tag to compare

♻️ Make types more accurate

♻️ State management & extend session states

  • use mutable state (remove immer package)
  • remove setInstance (all changes have been already applied)
  • remove loading session state
  • add retrieving, refreshing, and signing-out session state

Bear Auth v2.0.0

16 Dec 18:50
Compare
Choose a tag to compare

Breaking changes

  • 💥 Access expiration timestamp instead of expiresIn value

    The expiresIn properties have been changed to expiration timestamp in ISO format.

    Before:

    await authenticate<AuthInfo>(bearAuthId, {
        // ...
        expiresIn: 3000,
    });

    After:

    await authenticate<AuthInfo>(bearAuthId, {
        // ...
        expiration: new Date(Date.now() + 3000).toISOString(),
    });

    The same applies for the return values of the setRefreshTokenHook handler.

New features

  • ✨ Add hook retry mechanism
  • ✨ Support React v19
  • 🔊 Add debug logs to getAccessToken
  • ⬆️ Minor & patch dependencies upgrade

Bug fixes

  • 🐛 Throw an error when using setLogLevel method with custom logger
  • 🐛 Clear storage on zod schema change
  • ♻️ Fix storage type

Internal

  • 🐛 Fix prettier (on save)
  • ➕ Add husky
  • ♻️ Update the core example