uppy/packages/@uppy/box
Mikael Finstad ec4bc58508
Provider user sessions (#4619)
New concept "simple auth" - authentication that happens immediately (in one http request) without redirecting to any third party.

uppyAuthToken initially used to simply contain an encrypted & json encoded OAuth2 access_token for a specific provider. Then we added refresh tokens as well inside uppyAuthToken #4448. Now we also allow storing other state or parameters needed for that specific provider, like username, password, host name, webdav URL etc... This is needed for providers like webdav, ftp etc, where the user needs to give some more input data while authenticating

Companion:
- `providerTokens` has been renamed to `providerUserSession` because it now includes not only tokens, but a user's session with a provider.

Companion `Provider` class:
- New `hasSimpleAuth` static boolean property - whether this provider uses simple auth
- uppyAuthToken expiry default 24hr again for providers that don't support refresh tokens
- make uppyAuthToken expiry configurable per provider - new `authStateExpiry` static property (defaults to 24hr)
- new static property `grantDynamicToUserSession`, allows providers to specify which state from Grant `dynamic` to include into the provider's `providerUserSession`.
2023-12-05 22:55:41 +01:00
..
src Provider user sessions (#4619) 2023-12-05 22:55:41 +01:00
types meta: run Prettier on existing files (#4713) 2023-09-29 11:11:28 +02:00
CHANGELOG.md Release: uppy@3.12.0 (#4574) 2023-07-13 16:34:41 +00:00
LICENSE companion,box: Box provider implementation (#2549) 2020-11-13 15:37:00 +01:00
package.json Release: uppy@3.18.0 (#4754) 2023-10-20 15:20:18 +00:00
README.md meta: Fix logos in all the readmes (#4407) 2023-04-07 23:46:04 +01:00

@uppy/box

Uppy logo: a smiling puppy above a pink upwards arrow

npm version CI status for Uppy tests CI status for Companion tests CI status for browser tests

The Box plugin for Uppy lets users import files from their Box account.

A Companion instance is required for the Box plugin to work. Companion handles authentication with Box, downloads files from Box and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.

Uppy is being developed by the folks at Transloadit, a versatile file encoding service.

Example

import Uppy from '@uppy/core'
import Box from '@uppy/box'

const uppy = new Uppy()
uppy.use(Box, {
  // Options
})

Installation

$ npm install @uppy/box

Alternatively, you can also use this plugin in a pre-built bundle from Transloadits CDN: Edgly. In that case Uppy will attach itself to the global window.Uppy object. See the main Uppy documentation for instructions.

Documentation

Documentation for this plugin can be found on the Uppy website.

License

The MIT License.