@uppy/companion-client: make supportsRefreshToken default (#5198)

This commit is contained in:
Mikael Finstad 2024-05-24 23:43:55 +02:00 committed by Antoine du Hamel
parent 60c513ab7d
commit dceda79a97
No known key found for this signature in database
GPG key ID: 21D900FFDB233756
2 changed files with 3 additions and 1 deletions

View file

@ -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 dont need to do anything.

View file

@ -87,7 +87,7 @@ export default class Provider<M extends Meta, B extends Body>
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<Record<string, string>> {