Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Don't use webClientId on mobile

Saúl Ibarra Corretgé418575136f78
diff --git a/react/features/recording/components/LiveStream/AbstractStartLiveStreamDialog.js b/react/features/recording/components/LiveStream/AbstractStartLiveStreamDialog.js
index 21818ee9c2..a5b7c9b8a5 100644
--- a/react/features/recording/components/LiveStream/AbstractStartLiveStreamDialog.js
+++ b/react/features/recording/components/LiveStream/AbstractStartLiveStreamDialog.js
@@ -20,12 +20,6 @@ export type Props = {
*/
_conference: Object,
- /**
- * The ID for the Google client application used for making stream key
- * related requests.
- */
- _googleApiApplicationClientID: string,
-
/**
* The current state of interactions with the Google API. Determines what
* Google related UI should display.
@@ -279,7 +273,6 @@ export default class AbstractStartLiveStreamDialog<P: Props>
* @param {Object} state - The Redux state.
* @returns {{
* _conference: Object,
- * _googleApiApplicationClientID: string,
* _googleAPIState: number,
* _googleProfileEmail: string,
* _streamKey: string
@@ -288,8 +281,6 @@ export default class AbstractStartLiveStreamDialog<P: Props>
export function _mapStateToProps(state: Object) {
return {
_conference: state['features/base/conference'].conference,
- _googleApiApplicationClientID:
- state['features/base/config'].googleApiApplicationClientID,
_googleAPIState: state['features/google-api'].googleAPIState,
_googleProfileEmail: state['features/google-api'].profileEmail,
_streamKey: state['features/recording'].streamKey
diff --git a/react/features/recording/components/LiveStream/GoogleSigninForm.native.js b/react/features/recording/components/LiveStream/GoogleSigninForm.native.js
index 7bba22e0c7..063e18631c 100644
--- a/react/features/recording/components/LiveStream/GoogleSigninForm.native.js
+++ b/react/features/recording/components/LiveStream/GoogleSigninForm.native.js
@@ -23,12 +23,6 @@ const logger = require('jitsi-meet-logger').getLogger(__filename);
*/
type Props = {
- /**
- * The ID for the Google client application used for making stream key
- * related requests.
- */
- clientId: string,
-
/**
* The Redux dispatch Function.
*/
@@ -44,12 +38,6 @@ type Props = {
*/
googleResponse: Object,
- /**
- * The ID for the Google client application used for making stream key
- * related requests on iOS.
- */
- iOSClientId: string,
-
/**
* A callback to be invoked when an authenticated user changes, so
* then we can get (or clear) the YouTube stream key.
@@ -86,22 +74,11 @@ class GoogleSigninForm extends Component<Props> {
* @inheritdoc
*/
componentDidMount() {
- if (!this.props.clientId) {
- // NOTE: This is a developer error message, not intended for the
- // user to see.
- logger.error('Missing clientID');
- this._setApiState(GOOGLE_API_STATES.NOT_AVAILABLE);
-
- return;
- }
-
googleApi.hasPlayServices()
.then(() => {
googleApi.configure({
- iosClientId: this.props.iOSClientId,
offlineAccess: false,
- scopes: [ GOOGLE_SCOPE_YOUTUBE ],
- webClientId: this.props.clientId
+ scopes: [ GOOGLE_SCOPE_YOUTUBE ]
});
googleApi.signInSilently().then(response => {
diff --git a/react/features/recording/components/LiveStream/StartLiveStreamDialog.native.js b/react/features/recording/components/LiveStream/StartLiveStreamDialog.native.js
index e179e33ff9..879ea67eee 100644
--- a/react/features/recording/components/LiveStream/StartLiveStreamDialog.native.js
+++ b/react/features/recording/components/LiveStream/StartLiveStreamDialog.native.js
@@ -10,24 +10,13 @@ import { googleApi } from '../../../google-api';
import { setLiveStreamKey } from '../../actions';
-import AbstractStartLiveStreamDialog, {
- _mapStateToProps as _abstractMapStateToProps,
- type Props as AbstractProps
-} from './AbstractStartLiveStreamDialog';
+import AbstractStartLiveStreamDialog,
+{ _mapStateToProps, type Props } from './AbstractStartLiveStreamDialog';
import GoogleSigninForm from './GoogleSigninForm';
import StreamKeyForm from './StreamKeyForm';
import StreamKeyPicker from './StreamKeyPicker';
import styles from './styles';
-type Props = AbstractProps & {
-
- /**
- * The ID for the Google client application used for making stream key
- * related requests on iOS.
- */
- _googleApiIOSClientID: string
-};
-
/**
* A React Component for requesting a YouTube stream key to use for live
* streaming of the current conference.
@@ -124,8 +113,6 @@ class StartLiveStreamDialog extends AbstractStartLiveStreamDialog<Props> {
return (
<View style = { styles.startDialogWrapper }>
<GoogleSigninForm
- clientId = { this.props._googleApiApplicationClientID }
- iOSClientId = { this.props._googleApiIOSClientID }
onUserChanged = { this._onUserChanged } />
<StreamKeyPicker
broadcasts = { this.state.broadcasts }
@@ -139,20 +126,4 @@ class StartLiveStreamDialog extends AbstractStartLiveStreamDialog<Props> {
}
-/**
- * Maps part of the Redux state to the component's props.
- *
- * @param {Object} state - The Redux state.
- * @returns {{
- * _googleApiApplicationClientID: string
- * }}
- */
-function _mapStateToProps(state: Object) {
- return {
- ..._abstractMapStateToProps(state),
- _googleApiIOSClientID:
- state['features/base/config'].googleApiIOSClientID
- };
-}
-
export default translate(connect(_mapStateToProps)(StartLiveStreamDialog));
diff --git a/react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js b/react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js
index 0ef9123105..e46d1ca4c1 100644
--- a/react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js
+++ b/react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js
@@ -18,12 +18,21 @@ import {
} from '../../../google-api';
import AbstractStartLiveStreamDialog, {
- _mapStateToProps,
- type Props
+ _mapStateToProps as _abstractMapStateToProps,
+ type Props as AbstractProps
} from './AbstractStartLiveStreamDialog';
import StreamKeyPicker from './StreamKeyPicker';
import StreamKeyForm from './StreamKeyForm';
+type Props = AbstractProps & {
+
+ /**
+ * The ID for the Google client application used for making stream key
+ * related requests.
+ */
+ _googleApiApplicationClientID: string
+}
+
/**
* A React Component for requesting a YouTube stream key to use for live
* streaming of the current conference.
@@ -340,4 +349,20 @@ class StartLiveStreamDialog
}
}
+/**
+ * Maps part of the Redux state to the component's props.
+ *
+ * @param {Object} state - The Redux state.
+ * @returns {{
+ * _googleApiApplicationClientID: string
+ * }}
+*/
+function _mapStateToProps(state: Object) {
+ return {
+ ..._abstractMapStateToProps(state),
+ _googleApiApplicationClientID:
+ state['features/base/config'].googleApiApplicationClientID
+ };
+}
+
export default translate(connect(_mapStateToProps)(StartLiveStreamDialog));