Skip to content

Releases: badgateway/oauth2-client

v2.0.14

Choose a tag to compare

@evert evert released this 24 Jun 00:45
c144508
  • Re-release, to publish on Github packages.

v2.0.13

Choose a tag to compare

@evert evert released this 19 Jun 23:50
4d4f480

Version 2 stable release!

Version 2 is a complete rewrite of this library that broadens the scope of to be a fully-featured general OAuth2 client. This package has been renamed from fetch-mw-oauth2 to @badgateway/oauth2-client.

The setup of this library has changed a lot, so if you are upgrading from 1.x.x or 0.x.x, you will have to change how you're setting up the OAuth2 setup. Take a look at the instructions in the readme to see how.

New features in v2

  • A general OAuth2 client library, with functions such as authorizationCode, clientCredentials, allowing you to directly access these features.
  • PKCE support for authorization_code.
  • Support for OAuth2 Token Introspection (RFC7662).
  • OAuth2 endpoint discovery via the Server metadata document (RFC8414).
  • Now uses Node 18's native fetch implementation. It's still possible to polyfill this with node-fetch, but this is not set up by default anymore. There's documentation on setting up the polyfill in the readme.

New since the last alpha release

  • Renamed this package from fetch-mw-oauth2 to @badgateway/oauth2-client.
  • #59: Scope support for authorization_code flow.

v2.0.12

Choose a tag to compare

@evert evert released this 19 Jun 23:12
02a2277

Version 2 stable release!

Version 2 is a complete rewrite of this library that broadens the scope of to be a fully-featured general OAuth2 client. This package has been renamed from fetch-mw-oauth2 to @badgateway/oauth2-client.

The setup of this library has changed a lot, so if you are upgrading from 1.x.x or 0.x.x, you will have to change how you're setting up the OAuth2 setup. Take a look at the instructions in the readme to see how.

New features in v2

  • A general OAuth2 client library, with functions such as authorizationCode, clientCredentials, allowing you to directly access these features.
  • PKCE support for authorization_code.
  • Support for OAuth2 Token Introspection (RFC7662).
  • OAuth2 endpoint discovery via the Server metadata document (RFC8414).
  • Now uses Node 18's native fetch implementation. It's still possible to polyfill this with node-fetch, but this is not set up by default anymore. There's documentation on setting up the polyfill in the readme.

New since the last alpha release

  • Renamed this package from fetch-mw-oauth2 to @badgateway/oauth2-client.
  • #59: Scope support for authorization_code flow.

v1.0.1

Choose a tag to compare

@evert evert released this 19 Jun 22:44
25ab58a
  • Maintenance release.

v2.0.10

v2.0.10 Pre-release
Pre-release

Choose a tag to compare

@evert evert released this 11 May 20:05
2bef29b

Fetch-mw-oauth2 v2 alpha

This is an alpha version of the upcoming v2. Version 2 is a complete rewrite of this library that broadens the scope of to be a fully-featured general OAuth2 client.

The fetch wrapper is still available, but it's just one of its features. The setup of this library has changed a lot, so if you are upgrading from 1.x.x or 0.x.x, you will have to change how you're setting up the OAuth2 setup. Take a look at the instructions in the readme to see how.

New features in v2

  • A general OAuth2 client library, with functions such as authorizationCode, clientCredentials, allowing you to directly access these features.
  • PKCE support for authorization_code.
  • Support for OAuth2 Token Introspection (RFC7662).
  • OAuth2 endpoint discovery via the Server metadata document (RFC8414).
  • Now uses Node 18's native fetch implementation. It's still possible to polyfill this with node-fetch, but this is not set up by default anymore. There's documentation on setting up the polyfill in the readme.

v1.0.0

Choose a tag to compare

@evert evert released this 28 Oct 21:16
84a5d1f
  • Dropped support for Node 10.
  • Fixed #45: Call onAuthError when a refresh fails.
  • Replaced awesome-typescript-loader with ts-loader for Webpack builds.
    the former appears unmaintained.
  • Switched from Travis CI to Github Actions.

v0.7.0

Choose a tag to compare

@evert evert released this 01 Dec 03:48
1085216
  • Ensure that only 1 refresh operation will happen in parallel. If there are
    multiple things triggering the refresh, all will wait for the first one
    to finish.
  • Automatically schedule a refresh operation 1 minute before the access token
    expires, if the expiry time is known.
  • BC Break: If a token is known when setting up OAuth2, this now needs to be
    passed as the second argument. The old behavior still works but will emit
    a warning, and will be removed in a future release.
  • 'OAuth2Token' type is now exported.

v0.6.1

Choose a tag to compare

@evert evert released this 20 Nov 03:03
1371583
  • #34: Refresh operation failed for the authorization_code flow.

v0.6.0

Choose a tag to compare

@evert evert released this 09 Nov 21:09
08ef628
  • Added a onAuthError event, allowing users to intercept this event and
    re-authenticate.
  • Simplify types a bit. More duplication in the library, but this should
    result in easier to read errors.
  • Typescript 4
  • Switch from tslint to eslint.
  • Webpack 5

0.3.4

Choose a tag to compare

@evert evert released this 19 Mar 03:21
  • This package now throws OAuth2Error classes for server-side errors.