Browse Source

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

Mikael Finstad 11 tháng trước cách đây
mục cha
commit
dceda79a97

+ 2 - 0
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`
 ### `@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
 - `Socket` class is no longer in use and has been removed. Unless you used this
   class you don’t need to do anything.
   class you don’t need to do anything.
 
 

+ 1 - 1
packages/@uppy/companion-client/src/Provider.ts

@@ -87,7 +87,7 @@ export default class Provider<M extends Meta, B extends Body>
     this.tokenKey = `companion-${this.pluginId}-auth-token`
     this.tokenKey = `companion-${this.pluginId}-auth-token`
     this.companionKeysParams = this.opts.companionKeysParams
     this.companionKeysParams = this.opts.companionKeysParams
     this.preAuthToken = null
     this.preAuthToken = null
-    this.supportsRefreshToken = opts.supportsRefreshToken ?? true // todo false in next major
+    this.supportsRefreshToken = !!opts.supportsRefreshToken
   }
   }
 
 
   async headers(): Promise<Record<string, string>> {
   async headers(): Promise<Record<string, string>> {