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

[RN] Don't use webClientId on mobile

That is only required if we'd want our backend to authenticate on behalf of our
users. If the app is to authenticate directly it's not needed.
j8
Saúl Ibarra Corretgé преди 7 години
родител
ревизия
418575136f

+ 0
- 9
react/features/recording/components/LiveStream/AbstractStartLiveStreamDialog.js Целия файл

20
      */
20
      */
21
     _conference: Object,
21
     _conference: Object,
22
 
22
 
23
-    /**
24
-     * The ID for the Google client application used for making stream key
25
-     * related requests.
26
-     */
27
-    _googleApiApplicationClientID: string,
28
-
29
     /**
23
     /**
30
      * The current state of interactions with the Google API. Determines what
24
      * The current state of interactions with the Google API. Determines what
31
      * Google related UI should display.
25
      * Google related UI should display.
279
  * @param {Object} state - The Redux state.
273
  * @param {Object} state - The Redux state.
280
  * @returns {{
274
  * @returns {{
281
  *     _conference: Object,
275
  *     _conference: Object,
282
- *     _googleApiApplicationClientID: string,
283
  *     _googleAPIState: number,
276
  *     _googleAPIState: number,
284
  *     _googleProfileEmail: string,
277
  *     _googleProfileEmail: string,
285
  *     _streamKey: string
278
  *     _streamKey: string
288
 export function _mapStateToProps(state: Object) {
281
 export function _mapStateToProps(state: Object) {
289
     return {
282
     return {
290
         _conference: state['features/base/conference'].conference,
283
         _conference: state['features/base/conference'].conference,
291
-        _googleApiApplicationClientID:
292
-            state['features/base/config'].googleApiApplicationClientID,
293
         _googleAPIState: state['features/google-api'].googleAPIState,
284
         _googleAPIState: state['features/google-api'].googleAPIState,
294
         _googleProfileEmail: state['features/google-api'].profileEmail,
285
         _googleProfileEmail: state['features/google-api'].profileEmail,
295
         _streamKey: state['features/recording'].streamKey
286
         _streamKey: state['features/recording'].streamKey

+ 1
- 24
react/features/recording/components/LiveStream/GoogleSigninForm.native.js Целия файл

23
  */
23
  */
24
 type Props = {
24
 type Props = {
25
 
25
 
26
-    /**
27
-     * The ID for the Google client application used for making stream key
28
-     * related requests.
29
-     */
30
-    clientId: string,
31
-
32
     /**
26
     /**
33
      * The Redux dispatch Function.
27
      * The Redux dispatch Function.
34
      */
28
      */
44
      */
38
      */
45
     googleResponse: Object,
39
     googleResponse: Object,
46
 
40
 
47
-    /**
48
-     * The ID for the Google client application used for making stream key
49
-     * related requests on iOS.
50
-     */
51
-    iOSClientId: string,
52
-
53
     /**
41
     /**
54
      * A callback to be invoked when an authenticated user changes, so
42
      * A callback to be invoked when an authenticated user changes, so
55
      * then we can get (or clear) the YouTube stream key.
43
      * then we can get (or clear) the YouTube stream key.
86
      * @inheritdoc
74
      * @inheritdoc
87
      */
75
      */
88
     componentDidMount() {
76
     componentDidMount() {
89
-        if (!this.props.clientId) {
90
-            // NOTE: This is a developer error message, not intended for the
91
-            // user to see.
92
-            logger.error('Missing clientID');
93
-            this._setApiState(GOOGLE_API_STATES.NOT_AVAILABLE);
94
-
95
-            return;
96
-        }
97
-
98
         googleApi.hasPlayServices()
77
         googleApi.hasPlayServices()
99
             .then(() => {
78
             .then(() => {
100
                 googleApi.configure({
79
                 googleApi.configure({
101
-                    iosClientId: this.props.iOSClientId,
102
                     offlineAccess: false,
80
                     offlineAccess: false,
103
-                    scopes: [ GOOGLE_SCOPE_YOUTUBE ],
104
-                    webClientId: this.props.clientId
81
+                    scopes: [ GOOGLE_SCOPE_YOUTUBE ]
105
                 });
82
                 });
106
 
83
 
107
                 googleApi.signInSilently().then(response => {
84
                 googleApi.signInSilently().then(response => {

+ 2
- 31
react/features/recording/components/LiveStream/StartLiveStreamDialog.native.js Целия файл

10
 
10
 
11
 import { setLiveStreamKey } from '../../actions';
11
 import { setLiveStreamKey } from '../../actions';
12
 
12
 
13
-import AbstractStartLiveStreamDialog, {
14
-    _mapStateToProps as _abstractMapStateToProps,
15
-    type Props as AbstractProps
16
-} from './AbstractStartLiveStreamDialog';
13
+import AbstractStartLiveStreamDialog,
14
+{ _mapStateToProps, type Props } from './AbstractStartLiveStreamDialog';
17
 import GoogleSigninForm from './GoogleSigninForm';
15
 import GoogleSigninForm from './GoogleSigninForm';
18
 import StreamKeyForm from './StreamKeyForm';
16
 import StreamKeyForm from './StreamKeyForm';
19
 import StreamKeyPicker from './StreamKeyPicker';
17
 import StreamKeyPicker from './StreamKeyPicker';
20
 import styles from './styles';
18
 import styles from './styles';
21
 
19
 
22
-type Props = AbstractProps & {
23
-
24
-    /**
25
-     * The ID for the Google client application used for making stream key
26
-     * related requests on iOS.
27
-     */
28
-    _googleApiIOSClientID: string
29
-};
30
-
31
 /**
20
 /**
32
  * A React Component for requesting a YouTube stream key to use for live
21
  * A React Component for requesting a YouTube stream key to use for live
33
  * streaming of the current conference.
22
  * streaming of the current conference.
124
         return (
113
         return (
125
             <View style = { styles.startDialogWrapper }>
114
             <View style = { styles.startDialogWrapper }>
126
                 <GoogleSigninForm
115
                 <GoogleSigninForm
127
-                    clientId = { this.props._googleApiApplicationClientID }
128
-                    iOSClientId = { this.props._googleApiIOSClientID }
129
                     onUserChanged = { this._onUserChanged } />
116
                     onUserChanged = { this._onUserChanged } />
130
                 <StreamKeyPicker
117
                 <StreamKeyPicker
131
                     broadcasts = { this.state.broadcasts }
118
                     broadcasts = { this.state.broadcasts }
139
 
126
 
140
 }
127
 }
141
 
128
 
142
-/**
143
- * Maps part of the Redux state to the component's props.
144
- *
145
- * @param {Object} state - The Redux state.
146
- * @returns {{
147
- *     _googleApiApplicationClientID: string
148
- * }}
149
- */
150
-function _mapStateToProps(state: Object) {
151
-    return {
152
-        ..._abstractMapStateToProps(state),
153
-        _googleApiIOSClientID:
154
-            state['features/base/config'].googleApiIOSClientID
155
-    };
156
-}
157
-
158
 export default translate(connect(_mapStateToProps)(StartLiveStreamDialog));
129
 export default translate(connect(_mapStateToProps)(StartLiveStreamDialog));

+ 27
- 2
react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js Целия файл

18
 } from '../../../google-api';
18
 } from '../../../google-api';
19
 
19
 
20
 import AbstractStartLiveStreamDialog, {
20
 import AbstractStartLiveStreamDialog, {
21
-    _mapStateToProps,
22
-    type Props
21
+    _mapStateToProps as _abstractMapStateToProps,
22
+    type Props as AbstractProps
23
 } from './AbstractStartLiveStreamDialog';
23
 } from './AbstractStartLiveStreamDialog';
24
 import StreamKeyPicker from './StreamKeyPicker';
24
 import StreamKeyPicker from './StreamKeyPicker';
25
 import StreamKeyForm from './StreamKeyForm';
25
 import StreamKeyForm from './StreamKeyForm';
26
 
26
 
27
+type Props = AbstractProps & {
28
+
29
+    /**
30
+     * The ID for the Google client application used for making stream key
31
+     * related requests.
32
+     */
33
+    _googleApiApplicationClientID: string
34
+}
35
+
27
 /**
36
 /**
28
  * A React Component for requesting a YouTube stream key to use for live
37
  * A React Component for requesting a YouTube stream key to use for live
29
  * streaming of the current conference.
38
  * streaming of the current conference.
340
     }
349
     }
341
 }
350
 }
342
 
351
 
352
+/**
353
+ * Maps part of the Redux state to the component's props.
354
+ *
355
+ * @param {Object} state - The Redux state.
356
+ * @returns {{
357
+ *     _googleApiApplicationClientID: string
358
+ * }}
359
+*/
360
+function _mapStateToProps(state: Object) {
361
+    return {
362
+        ..._abstractMapStateToProps(state),
363
+        _googleApiApplicationClientID:
364
+        state['features/base/config'].googleApiApplicationClientID
365
+    };
366
+}
367
+
343
 export default translate(connect(_mapStateToProps)(StartLiveStreamDialog));
368
 export default translate(connect(_mapStateToProps)(StartLiveStreamDialog));

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