|
@@ -66,6 +66,11 @@ class LoginDialog extends Component {
|
66
|
66
|
*/
|
67
|
67
|
_error: PropTypes.string,
|
68
|
68
|
|
|
69
|
+ /**
|
|
70
|
+ * The credential that the user has failed to authenticate with.
|
|
71
|
+ */
|
|
72
|
+ _errorCredentials: PropTypes.object,
|
|
73
|
+
|
69
|
74
|
/**
|
70
|
75
|
* Any extra details about the error provided by lib-jitsi-meet.
|
71
|
76
|
*/
|
|
@@ -113,6 +118,7 @@ class LoginDialog extends Component {
|
113
|
118
|
const {
|
114
|
119
|
_connecting: connecting,
|
115
|
120
|
_error: error,
|
|
121
|
+ _errorCredentials: errorCredentials,
|
116
|
122
|
_errorDetails: errorDetails,
|
117
|
123
|
t
|
118
|
124
|
} = this.props;
|
|
@@ -121,7 +127,12 @@ class LoginDialog extends Component {
|
121
|
127
|
const messageOptions = {};
|
122
|
128
|
|
123
|
129
|
if (error === JitsiConnectionErrors.PASSWORD_REQUIRED) {
|
124
|
|
- messageKey = 'dialog.incorrectPassword';
|
|
130
|
+ // Show the message if there's been a user ID or password provided.
|
|
131
|
+ messageKey
|
|
132
|
+ = errorCredentials
|
|
133
|
+ && (errorCredentials.jid || errorCredentials.password)
|
|
134
|
+ ? 'dialog.incorrectPassword'
|
|
135
|
+ : null;
|
125
|
136
|
} else if (error) {
|
126
|
137
|
messageKey = 'dialog.connectErrorWithMsg';
|
127
|
138
|
messageOptions.msg = `${error} ${errorDetails}`;
|
|
@@ -147,7 +158,7 @@ class LoginDialog extends Component {
|
147
|
158
|
value = { this.state.password } />
|
148
|
159
|
<Text style = { styles.loginDialogText }>
|
149
|
160
|
{
|
150
|
|
- error
|
|
161
|
+ messageKey
|
151
|
162
|
? t(messageKey, messageOptions)
|
152
|
163
|
: connecting
|
153
|
164
|
? t('connection.CONNECTING')
|
|
@@ -229,6 +240,7 @@ class LoginDialog extends Component {
|
229
|
240
|
* _configHosts: Object,
|
230
|
241
|
* _connecting: boolean,
|
231
|
242
|
* _error: string,
|
|
243
|
+ * _errorCredentials: Object,
|
232
|
244
|
* _errorDetails: string
|
233
|
245
|
* }}
|
234
|
246
|
*/
|
|
@@ -241,20 +253,24 @@ function _mapStateToProps(state) {
|
241
|
253
|
const { hosts: configHosts } = state['features/base/config'];
|
242
|
254
|
const {
|
243
|
255
|
connecting,
|
|
256
|
+ credentials,
|
244
|
257
|
error: connectionError,
|
245
|
258
|
errorMessage: connectionErrorMessage
|
246
|
259
|
} = state['features/base/connection'];
|
247
|
260
|
|
248
|
261
|
let error;
|
|
262
|
+ let errorCredentials;
|
249
|
263
|
let errorDetails;
|
250
|
264
|
|
251
|
265
|
if (connectionError) {
|
252
|
266
|
error = connectionError;
|
|
267
|
+ errorCredentials = credentials;
|
253
|
268
|
errorDetails = connectionErrorMessage;
|
254
|
269
|
} else if (upgradeRoleError) {
|
255
|
270
|
error
|
256
|
271
|
= upgradeRoleError.connectionError
|
257
|
272
|
|| upgradeRoleError.authenticationError;
|
|
273
|
+ errorCredentials = upgradeRoleError.credentials;
|
258
|
274
|
errorDetails = upgradeRoleError.message;
|
259
|
275
|
}
|
260
|
276
|
|
|
@@ -263,6 +279,7 @@ function _mapStateToProps(state) {
|
263
|
279
|
_configHosts: configHosts,
|
264
|
280
|
_connecting: Boolean(connecting) || Boolean(upgradeRoleInProgress),
|
265
|
281
|
_error: error,
|
|
282
|
+ _errorCredentials: errorCredentials,
|
266
|
283
|
_errorDetails: errorDetails
|
267
|
284
|
};
|
268
|
285
|
}
|