diff --git a/res/css/views/auth/_ServerConfig.scss b/res/css/views/auth/_ServerConfig.scss
index a7e0057ab3..573171e4e7 100644
--- a/res/css/views/auth/_ServerConfig.scss
+++ b/res/css/views/auth/_ServerConfig.scss
@@ -23,13 +23,3 @@ limitations under the License.
display: block;
color: $warning-color;
}
-
-.mx_ServerConfig_identityServer {
- transform: scaleY(0);
- transform-origin: top;
- transition: transform 0.25s;
-
- &.mx_ServerConfig_identityServer_shown {
- transform: scaleY(1);
- }
-}
diff --git a/src/PasswordReset.js b/src/PasswordReset.js
index 9472ddc633..b38a9de960 100644
--- a/src/PasswordReset.js
+++ b/src/PasswordReset.js
@@ -40,10 +40,6 @@ export default class PasswordReset {
this.identityServerDomain = identityUrl ? identityUrl.split("://")[1] : null;
}
- doesServerRequireIdServerParam() {
- return this.client.doesServerRequireIdServerParam();
- }
-
/**
* Attempt to reset the user's password. This will trigger a side-effect of
* sending an email to the provided email address.
@@ -78,9 +74,6 @@ export default class PasswordReset {
sid: this.sessionId,
client_secret: this.clientSecret,
};
- if (await this.doesServerRequireIdServerParam()) {
- creds.id_server = this.identityServerDomain;
- }
try {
await this.client.setPassword({
diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js
index e599808f0d..e3bae7e38d 100644
--- a/src/components/structures/auth/ForgotPassword.js
+++ b/src/components/structures/auth/ForgotPassword.js
@@ -62,7 +62,6 @@ export default class ForgotPassword extends React.Component {
serverIsAlive: true,
serverErrorIsFatal: false,
serverDeadError: "",
- serverRequiresIdServer: null,
};
constructor(props) {
@@ -93,12 +92,8 @@ export default class ForgotPassword extends React.Component {
serverConfig.isUrl,
);
- const pwReset = new PasswordReset(serverConfig.hsUrl, serverConfig.isUrl);
- const serverRequiresIdServer = await pwReset.doesServerRequireIdServerParam();
-
this.setState({
serverIsAlive: true,
- serverRequiresIdServer,
});
} catch (e) {
this.setState(AutoDiscoveryUtils.authComponentStateForError(e, "forgot_password"));
@@ -216,7 +211,6 @@ export default class ForgotPassword extends React.Component {
serverConfig={this.props.serverConfig}
onServerConfigChange={this.props.onServerConfigChange}
delayTimeMs={0}
- showIdentityServerIfRequiredByHomeserver={true}
onAfterSubmit={this.onServerDetailsNextPhaseClick}
submitText={_t("Next")}
submitClass="mx_Login_submit"
@@ -274,22 +268,6 @@ export default class ForgotPassword extends React.Component {
;
}
- if (!this.props.serverConfig.isUrl && this.state.serverRequiresIdServer) {
- return
-
- {yourMatrixAccountText}
- {editLink}
-
- {_t(
- "No identity server is configured: " +
- "add one in server settings to reset your password.",
- )}
-
- {_t('Sign in instead')}
-
-
;
- }
-
return
{errorText}
{serverDeadSection}
diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx
index 45bfbcef46..a31a07a96b 100644
--- a/src/components/structures/auth/Registration.tsx
+++ b/src/components/structures/auth/Registration.tsx
@@ -111,8 +111,6 @@ interface IState {
// Our matrix client - part of state because we can't render the UI auth
// component without it.
matrixClient?: MatrixClient;
- // whether the HS requires an ID server to register with a threepid
- serverRequiresIdServer?: boolean;
// The user ID we've just registered
registeredUsername?: string;
// if a different user ID to the one we just registered is logged in,
@@ -254,13 +252,6 @@ export default class Registration extends React.Component
{
idBaseUrl: isUrl,
});
- let serverRequiresIdServer = true;
- try {
- serverRequiresIdServer = await cli.doesServerRequireIdServerParam();
- } catch (e) {
- console.log("Unable to determine is server needs id_server param", e);
- }
-
this.loginLogic.setHomeserverUrl(hsUrl);
this.loginLogic.setIdentityServerUrl(isUrl);
@@ -274,7 +265,6 @@ export default class Registration extends React.Component {
this.setState({
matrixClient: cli,
- serverRequiresIdServer,
ssoFlow,
busy: false,
});
@@ -573,7 +563,6 @@ export default class Registration extends React.Component {
serverConfig={this.props.serverConfig}
onServerConfigChange={this.props.onServerConfigChange}
delayTimeMs={250}
- showIdentityServerIfRequiredByHomeserver={true}
onAfterSubmit={this.onServerDetailsNextPhaseClick}
submitText={_t("Next")}
submitClass="mx_Login_submit"
@@ -644,7 +633,6 @@ export default class Registration extends React.Component {
flows={this.state.flows}
serverConfig={this.props.serverConfig}
canSubmit={!this.state.serverErrorIsFatal}
- serverRequiresIdServer={this.state.serverRequiresIdServer}
/>
;
}
diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.js b/src/components/views/auth/InteractiveAuthEntryComponents.js
index 6628ca7120..60e57afc98 100644
--- a/src/components/views/auth/InteractiveAuthEntryComponents.js
+++ b/src/components/views/auth/InteractiveAuthEntryComponents.js
@@ -18,7 +18,6 @@ limitations under the License.
import React, {createRef} from 'react';
import PropTypes from 'prop-types';
-import url from 'url';
import classnames from 'classnames';
import * as sdk from '../../../index';
@@ -500,17 +499,11 @@ export class MsisdnAuthEntry extends React.Component {
});
try {
- const requiresIdServerParam =
- await this.props.matrixClient.doesServerRequireIdServerParam();
let result;
if (this._submitUrl) {
result = await this.props.matrixClient.submitMsisdnTokenOtherUrl(
this._submitUrl, this._sid, this.props.clientSecret, this.state.token,
);
- } else if (requiresIdServerParam) {
- result = await this.props.matrixClient.submitMsisdnToken(
- this._sid, this.props.clientSecret, this.state.token,
- );
} else {
throw new Error("The registration with MSISDN flow is misconfigured");
}
@@ -519,12 +512,6 @@ export class MsisdnAuthEntry extends React.Component {
sid: this._sid,
client_secret: this.props.clientSecret,
};
- if (requiresIdServerParam) {
- const idServerParsedUrl = url.parse(
- this.props.matrixClient.getIdentityServerUrl(),
- );
- creds.id_server = idServerParsedUrl.host;
- }
this.props.submitAuthDict({
type: MsisdnAuthEntry.LOGIN_TYPE,
// TODO: Remove `threepid_creds` once servers support proper UIA
diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx
index 610618bb3e..b005c8e0e2 100644
--- a/src/components/views/auth/RegistrationForm.tsx
+++ b/src/components/views/auth/RegistrationForm.tsx
@@ -54,7 +54,6 @@ interface IProps {
}[];
serverConfig: ValidatedServerConfig;
canSubmit?: boolean;
- serverRequiresIdServer?: boolean;
onRegisterClick(params: {
username: string;
@@ -118,21 +117,7 @@ export default class RegistrationForm extends React.PureComponent {
- if (confirmed) this.doSubmit(ev);
- },
- });
- } else if (this.showEmail()) {
+ if (this.showEmail()) {
CountlyAnalytics.instance.track("onboarding_registration_submit_warn");
Modal.createTrackedDialog("Email prompt dialog", '', RegistrationEmailPromptDialog, {
onFinished: async (confirmed: boolean, email?: string) => {
@@ -420,11 +405,7 @@ export default class RegistrationForm extends React.PureComponent;
}
}
- const haveIs = Boolean(this.props.serverConfig.isUrl);
- let noIsText = null;
- if (this.props.serverRequiresIdServer && !haveIs) {
- noIsText =
- {_t(
- "No identity server is configured so you cannot add an email address in order to " +
- "reset your password in the future.",
- )}
-
;
- }
return (
@@ -582,7 +548,6 @@ export default class RegistrationForm extends React.PureComponent
{ emailHelperText }
- { noIsText }
{ registerButton }
diff --git a/src/components/views/auth/ServerConfig.js b/src/components/views/auth/ServerConfig.js
index e04bf9e25a..448616af15 100644
--- a/src/components/views/auth/ServerConfig.js
+++ b/src/components/views/auth/ServerConfig.js
@@ -24,8 +24,6 @@ import { _t } from '../../../languageHandler';
import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils";
import AutoDiscoveryUtils from "../../../utils/AutoDiscoveryUtils";
import SdkConfig from "../../../SdkConfig";
-import { createClient } from 'matrix-js-sdk/src/matrix';
-import classNames from 'classnames';
import CountlyAnalytics from "../../../CountlyAnalytics";
/*
@@ -50,10 +48,6 @@ export default class ServerConfig extends React.PureComponent {
// Optional class for the submit button. Only applies if the submit button
// is to be rendered.
submitClass: PropTypes.string,
-
- // Whether the flow this component is embedded in requires an identity
- // server when the homeserver says it will need one. Default false.
- showIdentityServerIfRequiredByHomeserver: PropTypes.bool,
};
static defaultProps = {
@@ -69,7 +63,6 @@ export default class ServerConfig extends React.PureComponent {
errorText: "",
hsUrl: props.serverConfig.hsUrl,
isUrl: props.serverConfig.isUrl,
- showIdentityServer: false,
};
CountlyAnalytics.instance.track("onboarding_custom_server");
@@ -92,23 +85,6 @@ export default class ServerConfig extends React.PureComponent {
return result;
}
- // If the UI flow this component is embedded in requires an identity
- // server when the homeserver says it will need one, check first and
- // reveal this field if not already shown.
- // XXX: This a backward compatibility path for homeservers that require
- // an identity server to be passed during certain flows.
- // See also https://github.com/matrix-org/synapse/pull/5868.
- if (
- this.props.showIdentityServerIfRequiredByHomeserver &&
- !this.state.showIdentityServer &&
- await this.isIdentityServerRequiredByHomeserver()
- ) {
- this.setState({
- showIdentityServer: true,
- });
- return null;
- }
-
return result;
}
@@ -165,15 +141,6 @@ export default class ServerConfig extends React.PureComponent {
}
}
- async isIdentityServerRequiredByHomeserver() {
- // XXX: We shouldn't have to create a whole new MatrixClient just to
- // check if the homeserver requires an identity server... Should it be
- // extracted to a static utils function...?
- return createClient({
- baseUrl: this.state.hsUrl,
- }).doesServerRequireIdServerParam();
- }
-
onHomeserverBlur = (ev) => {
this._hsTimeoutId = this._waitThenInvoke(this._hsTimeoutId, () => {
this.validateServer();
@@ -185,17 +152,6 @@ export default class ServerConfig extends React.PureComponent {
this.setState({ hsUrl });
};
- onIdentityServerBlur = (ev) => {
- this._isTimeoutId = this._waitThenInvoke(this._isTimeoutId, () => {
- this.validateServer();
- });
- };
-
- onIdentityServerChange = (ev) => {
- const isUrl = ev.target.value;
- this.setState({ isUrl });
- };
-
onSubmit = async (ev) => {
ev.preventDefault();
ev.stopPropagation();
@@ -239,29 +195,6 @@ export default class ServerConfig extends React.PureComponent {
;
}
- _renderIdentityServerSection() {
- const Field = sdk.getComponent('elements.Field');
- const classes = classNames({
- "mx_ServerConfig_identityServer": true,
- "mx_ServerConfig_identityServer_shown": this.state.showIdentityServer,
- });
- return ;
- }
-
render() {
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
@@ -283,7 +216,6 @@ export default class ServerConfig extends React.PureComponent {
{_t("Other servers")}
{errorText}
{this._renderHomeserverSection()}
- {this._renderIdentityServerSection()}
{submitButton}
);