Skip to content

Releases: AckeeCZ/bear-auth

@bear-auth/core@3.0.12

27 Aug 07:35

Choose a tag to compare

Bear Auth v3.0.12

✨ The setAlarmManager returns now pause and resume to make possible to control the auto refreshment process:

import { setAlarmManager } from '@bear-auth/core';

const controlAutoRefreshTokenProcess = setAlarmManager('myInstanceId', {
    async createAlarm(callback, delay) {
        // create alarm, return alarm ID
    },
    async clearAlarm(id, callback) {
        // clear alarm
    },
});

// For example, you can pause / resume the auto refresh token process on network change
yourMethodForHandlingNetworkChange(async isOnline => {
    if (isOnline) {
        await controlAutoRefreshTokenProcess.resume();
    } else {
        await controlAutoRefreshTokenProcess.pause();
    }
});

Full Changelog: https://github.com/AckeeCZ/bear-auth/compare/@bear-auth/core@3.0.8...@bear-auth/core@3.0.12

Bear Auth v3.0.9

06 Aug 12:46

Choose a tag to compare

setAlarmManager

Optionally, you can now override the defaults setTimeout / clearTimeout methods to implement a custom timer, such as:

import { setAlarmManager } from '@bear-auth/core';

setAlarmManager('myInstanceId', {
    async createAlarm(callback, delay) {
        // create alarm, return alarm ID
    },
    async clearAlarm(id) {
        // clear alarm
    },
});

Full Changelog: https://github.com/AckeeCZ/bear-auth/compare/@bear-auth/core@3.0.8...@bear-auth/core@3.0.9

Bear Auth v3.0.8

01 Aug 12:52

Choose a tag to compare

  • 613065e ✨ Return the same promise when calling async fn multiple times
  • 831e703 ♻️ Refactor state management, fix race-condition issue
  • 41a11f2 ✨ Enhance continueWhenOnline to accept task names & use continueWhenOnline in fetchAuthInfo too
    import { setContinueWhenOnline } from '@bear-auth/core';
    
    setContinueWhenOnline('myInstance', async taskName => {
        // Set custom code to tell the Bear Auth when the app is online and can proceed with given task.
        // Optionally, you can decide based on the `taskName` ('logout', 'refreshToken', etc.)
    });

Full Changelog: https://github.com/AckeeCZ/bear-auth/compare/@bear-auth/core@3.0.7...@bear-auth/core@3.0.8

Bear Auth v3.0.4

25 Jun 17:59

Choose a tag to compare

  • 1436adc 🔧 Switch from Bundler to NodeNext module resolution
  • c270a1d ♻️ Use crypto.getRandomValues instead of randomUUID
  • 39c5703 ♻️ Remove redundant package exports

Full Changelog: https://github.com/AckeeCZ/bear-auth/compare/@bear-auth/core@3.0.3...@bear-auth/core@3.0.4

Bear Auth v3.0.0

18 Jun 15:29

Choose a tag to compare

Bear Auth v2.1.8

18 Jun 10:50

Choose a tag to compare

  • Fix getAccessToken, retrieveAuthSession.
  • Rename argument: create({ instanceId: 'foo' }) -> create({ id: 'foo' }).
  • Set loglevel null when using a custom logger (The setLogger method).
  • 7ed2db7 ✅ Add e2e smoke test for the core example
  • 4ea8638 ✅ Add unit and intergration tests
  • 01df848 ✨ Add core unit tests
  • 2eeebf2 ⬆️ yarn & node

Bear Auth v2.1.6

02 Jun 07:51

Choose a tag to compare

🐛 Fix state management.

Bear Auth v2.1.5

13 May 09:34

Choose a tag to compare

♻️ Extend auth session validity

If retrieved session doesn't include refresh token but the access token is valid, result it as auth session.

Bear Auth v2.1.4

09 Apr 10:43

Choose a tag to compare

  • 8975019 🏷️ Fix cir. type ref.
  • 37f01f9 ⬆️ Upgrade dependencies

@bear-auth/core@2.1.1

02 Apr 06:50

Choose a tag to compare

  • 🐛 Fix retrieving authenticated session (pass reference to refreshed access token to the fetch auth. info. hook).