From dceda79a97519cc9d509fc367df6e0073893f7a7 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Fri, 24 May 2024 23:43:55 +0200 Subject: [PATCH] @uppy/companion-client: make `supportsRefreshToken` default (#5198) --- docs/guides/migration-guides.md | 2 ++ packages/@uppy/companion-client/src/Provider.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guides/migration-guides.md b/docs/guides/migration-guides.md index 46845cfde..33f8804a0 100644 --- a/docs/guides/migration-guides.md +++ b/docs/guides/migration-guides.md @@ -21,6 +21,8 @@ These cover all the major Uppy versions and how to migrate to them. ### `@uppy/companion-client` +- `supportsRefreshToken` now defaults to `false` instead of `true`. If you have + implemented a custom provider, this might affect you. - `Socket` class is no longer in use and has been removed. Unless you used this class you don’t need to do anything. diff --git a/packages/@uppy/companion-client/src/Provider.ts b/packages/@uppy/companion-client/src/Provider.ts index aad0ef42e..df87b9c17 100644 --- a/packages/@uppy/companion-client/src/Provider.ts +++ b/packages/@uppy/companion-client/src/Provider.ts @@ -87,7 +87,7 @@ export default class Provider this.tokenKey = `companion-${this.pluginId}-auth-token` this.companionKeysParams = this.opts.companionKeysParams this.preAuthToken = null - this.supportsRefreshToken = opts.supportsRefreshToken ?? true // todo false in next major + this.supportsRefreshToken = !!opts.supportsRefreshToken } async headers(): Promise> {