Browse Source

Merge pull request #1030 from tranvansang/patch-2

Fix bug: oauth always redirects to root path
Ifedapo .A. Olarewaju 6 years ago
parent
commit
4cf7ef9c39
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/@uppy/companion/src/server/provider/index.js

+ 2 - 0
packages/@uppy/companion/src/server/provider/index.js

@@ -146,6 +146,8 @@ module.exports.addProviderOptions = (options, grantConfig) => {
       if (server.implicitPath) {
         // no url builder is used for this because grant internally adds the path
         grantConfig[authProvider].callback = `${server.implicitPath}${grantConfig[authProvider].callback}`
+      } else if (server.path) {
+        grantConfig[authProvider].callback = `${server.path}${grantConfig[authProvider].callback}`
       }
     } else if (authProvider !== 's3') { // TODO: there should be a cleaner way to do this.
       logger.warn(`skipping one found unsupported provider "${authProvider}".`, 'provider.options.skip')