Преглед на файлове

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
     // Enable the dropbox integration.
174
     // Enable the dropbox integration.
175
     // dropbox: {
175
     // dropbox: {
176
     //     appKey: '<APP_KEY>' // Specify your app key here.
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
     // Whether to enable live streaming or not.
184
     // Whether to enable live streaming or not.

+ 8
- 4
react/features/dropbox/actions.js Целия файл

1
 // @flow
1
 // @flow
2
 
2
 
3
-import { getLocationContextRoot } from '../base/util';
4
-
5
 import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
3
 import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
6
 import { _authorizeDropbox } from './functions';
4
 import { _authorizeDropbox } from './functions';
7
 
5
 
15
         const state = getState();
13
         const state = getState();
16
         const { locationURL } = state['features/base/connection'];
14
         const { locationURL } = state['features/base/connection'];
17
         const { dropbox = {} } = state['features/base/config'];
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
         _authorizeDropbox(dropbox.appKey, redirectURI)
25
         _authorizeDropbox(dropbox.appKey, redirectURI)
22
             .then(
26
             .then(

Loading…
Отказ
Запис