Skip to content

3.0.0

Choose a tag to compare

@StimulCross StimulCross released this 21 Oct 12:26
· 116 commits to main since this release

Breaking changes

General

  • require Node.JS version 16 or higher (1f81b29)

auth

  • remove addUser and removeUser from AuthProvider interface (e298da3)
  • make clientId read-only in AuthProvider interface (61af3d8)
  • rename RefreshConfig interface to RefreshingAuthProviderConfig (4825d43)
  • make refreshToken and expiresIn nullable (f8312e0)
  • remove the second param with initial users array from StaticAuthProvider and RefreshingAuthProvider constructors (427798c)
  • rename helper function getAccessToken to exchangeCode (991e8b8)
  • use EventEmitter to listen to refresh token events instead of onRefresh callback in the auth provider config (c50c848)
  • rename scope to scopes in AcessToken interface (8258274)
  • make AccessToken properties read-only (2d50560)
  • narrow AccessToken param in StaticAuthprovider to include only accessToken and scopes (8377f41)
  • create AccessTokenWithUserId interface and make getAccessToken and refreshAccessToken return it (9385550)

events

  • get rid of throwing an error in removeUser method if a user is not registered (a7ccf0a)

Features

auth

  • create InvalidTokenError (4193766)
  • add hasUser method to StaticAuthProvider and RefreshingAuthProvider (85091be)
  • add addUserForToken and addUserForCode to RefreshingAuthProvider (c7349dd)
  • add scopes check for addUser method in StaticAuthProvider and RefreshingAuthProvider (23d7e56)
  • add simple non-falsy token validation in StaticAuthProvider and RefreshingAuthProvider (de93353)

events

  • add hasUser method to EventsClient (2a8f517)
  • add onConnect and onDisconnect listeners to EventsClient (17b4de5)

All other changes relate to the documentation or small refactors,