Simplify registration with email validation (#11398)

This commit is contained in:
Michael Telatynski 2023-08-15 16:14:53 +01:00 committed by GitHub
parent beafe686a9
commit 0842559fb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 437 additions and 55 deletions

View file

@ -176,8 +176,6 @@ interface IProps {
initialScreenAfterLogin?: IScreen;
// displayname, if any, to set on the device when logging in/registering.
defaultDeviceDisplayName?: string;
// A function that makes a registration URL
makeRegistrationUrl: (params: QueryDict) => string;
}
interface IState {
@ -2004,13 +2002,6 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
this.setState({ serverConfig });
};
private makeRegistrationUrl = (params: QueryDict): string => {
if (this.props.startingFragmentQueryParams?.referrer) {
params.referrer = this.props.startingFragmentQueryParams.referrer;
}
return this.props.makeRegistrationUrl(params);
};
/**
* After registration or login, we run various post-auth steps before entering the app
* proper, such setting up cross-signing or verifying the new session.
@ -2121,7 +2112,6 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
idSid={this.state.register_id_sid}
email={email}
brand={this.props.config.brand}
makeRegistrationUrl={this.makeRegistrationUrl}
onLoggedIn={this.onRegisterFlowComplete}
onLoginClick={this.onLoginClick}
onServerConfigChange={this.onServerConfigChange}