浏览代码

Update dropbox redirect uri to always use the main domain static page.

j8
damencho 6 年前
父节点
当前提交
b3a05db286
共有 2 个文件被更改,包括 13 次插入4 次删除
  1. 5
    0
      config.js
  2. 8
    4
      react/features/dropbox/actions.js

+ 5
- 0
config.js 查看文件

@@ -174,6 +174,11 @@ var config = {
174 174
     // Enable the dropbox integration.
175 175
     // dropbox: {
176 176
     //     appKey: '<APP_KEY>' // Specify your app key here.
177
+    //     // A URL to redirect the user to, after authenticating
178
+    //     // by default uses:
179
+    //     // 'https://jitsi-meet.example.com/static/oauth.html'
180
+    //     redirectURI:
181
+    //          'https://jitsi-meet.example.com/subfolder/static/oauth.html'
177 182
     // },
178 183
 
179 184
     // Whether to enable live streaming or not.

+ 8
- 4
react/features/dropbox/actions.js 查看文件

@@ -1,7 +1,5 @@
1 1
 // @flow
2 2
 
3
-import { getLocationContextRoot } from '../base/util';
4
-
5 3
 import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
6 4
 import { _authorizeDropbox } from './functions';
7 5
 
@@ -15,8 +13,14 @@ export function authorizeDropbox() {
15 13
         const state = getState();
16 14
         const { locationURL } = state['features/base/connection'];
17 15
         const { dropbox = {} } = state['features/base/config'];
18
-        const redirectURI = `${locationURL.origin
19
-            + getLocationContextRoot(locationURL)}static/oauth.html`;
16
+
17
+        // By default we use the static page on the main domain for redirection.
18
+        // So we need to setup only one redirect URI in dropbox app
19
+        // configuration (not multiple for all the tenants).
20
+        // In case deployment is running in subfolder dropbox.redirectURI
21
+        // can be configured.
22
+        const redirectURI
23
+            = dropbox.redirectURI || `${locationURL.origin}/static/oauth.html`;
20 24
 
21 25
         _authorizeDropbox(dropbox.appKey, redirectURI)
22 26
             .then(

正在加载...
取消
保存