Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider user sessions #4619

Merged
merged 38 commits into from
Dec 5, 2023
Merged

Provider user sessions #4619

merged 38 commits into from
Dec 5, 2023

Commits on Aug 9, 2023

  1. remove useless line

    mifi committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    df98cca View commit details
    Browse the repository at this point in the history
  2. fix broken cookie removal logic

    related #4426
    mifi committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    9ccf2ae View commit details
    Browse the repository at this point in the history
  3. fix mime type of thumbnails

    not critical but some browsers might have problems
    mifi committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    04128f9 View commit details
    Browse the repository at this point in the history
  4. simplify/speedup token generation

    so we don't have to decode/decrypt/encode/encrypt so many times
    mifi committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    9ceac7c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    600b2d0 View commit details
    Browse the repository at this point in the history
  6. Implement alternative provider auth

    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`.
    mifi committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    da67ac9 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2023

  1. refactor

    mifi committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    7d59489 View commit details
    Browse the repository at this point in the history
  2. use respondWithError

    also for thumbnails
    for consistency
    mifi committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    ab06da6 View commit details
    Browse the repository at this point in the history
  3. fix prepareStream

    it wasn't returning the status code (like `got` does on error)
    it's needed to respond properly with a http error
    mifi committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    16d4e3f View commit details
    Browse the repository at this point in the history
  4. don't throw when missing i18n key

    instead log error and show the key
    this in on par with other i18n frameworks
    mifi committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    2092387 View commit details
    Browse the repository at this point in the history
  5. fix bugged try/catch

    mifi committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    f575dbc View commit details
    Browse the repository at this point in the history
  6. allow aborting login too

    and don't replace the whole view with a loader when plugin state loading
    it will cause auth views to lose state
    an inter-view loading text looks much more graceful and is how SearchProviderView works too
    mifi committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    754e2e0 View commit details
    Browse the repository at this point in the history
  7. add json http error support

    add support for passing objects and messages from companion to uppy
    this allows companion to for example give a more detailed error when authenticating
    mifi committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    6441123 View commit details
    Browse the repository at this point in the history
  8. don't tightly couple auth form with html form

    don't force the user to use html form
    and use preact for it, for flexibility
    mifi committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    f503d1f View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. fix i18n

    mifi committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    272e3d1 View commit details
    Browse the repository at this point in the history
  2. make contentType parameterized

    mifi committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    f2e5aa4 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2023

  1. merge main

    mifi committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    8016a5d View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into provider-user-sessions

    # Conflicts:
    #	packages/@uppy/companion/src/server/controllers/refresh-token.js
    #	packages/@uppy/companion/src/server/provider/index.js
    mifi committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    9f160f4 View commit details
    Browse the repository at this point in the history
  3. allow sending certain errors to the user

    this is useful because:
    
          // onedrive gives some errors here that the user might want to know about
          // e.g. these happen if you try to login to a users in an organization,
          // without an Office365 licence or OneDrive account setup completed
          // 400: Tenant does not have a SPO license
          // 403: You do not have access to create this personal site or you do not have a valid license
    mifi committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    a28fcec View commit details
    Browse the repository at this point in the history
  4. don't have default content-type

    mifi committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    3166db9 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. make a loginSimpleAuth api too

    mifi committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    5c20186 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2023

  1. Merge branch 'main' into provider-user-sessions

    # Conflicts:
    #	packages/@uppy/companion-client/src/Provider.js
    #	packages/@uppy/companion/src/server/provider/error.d.ts
    mifi committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    b33f5b1 View commit details
    Browse the repository at this point in the history
  2. make removeAuthToken protected

    (cherry picked from commit 4be2b6f)
    mifi committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    7549da4 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. Configuration menu
    Copy the full SHA
    8794f63 View commit details
    Browse the repository at this point in the history
  2. fix lint

    mifi committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    42f74b2 View commit details
    Browse the repository at this point in the history
  3. run yarn format

    mifi committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    7a84c8d View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. Apply suggestions from code review

    Co-authored-by: Antoine du Hamel <[email protected]>
    mifi and aduh95 authored Nov 29, 2023
    Configuration menu
    Copy the full SHA
    38eee72 View commit details
    Browse the repository at this point in the history
  2. fix broken merge conflict

    mifi committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    70a7a48 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2023

  1. improve inheritance

    mifi committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    0d81a9b View commit details
    Browse the repository at this point in the history
  2. fix bug

    mifi committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    96eb565 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2023

  1. Configuration menu
    Copy the full SHA
    67d8595 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2023

  1. use duck typing for error checks

    see discussion here: #4619 (comment)
    mifi committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    5025a73 View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Antoine du Hamel <[email protected]>
    mifi and aduh95 authored Dec 5, 2023
    Configuration menu
    Copy the full SHA
    761dcdc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    95c8e38 View commit details
    Browse the repository at this point in the history
  4. fix broken lint fix script

    mifi committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    64ce471 View commit details
    Browse the repository at this point in the history
  5. fix broken merge code

    mifi committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    654da1a View commit details
    Browse the repository at this point in the history
  6. try to fix flakey tets

    mifi committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    a69a1fe View commit details
    Browse the repository at this point in the history
  7. fix lint

    mifi committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    6d766cb View commit details
    Browse the repository at this point in the history