matrix-react-sdk
Version:
SDK for matrix.org using React
66 lines (65 loc) • 1.94 kB
TypeScript
import React, { ReactNode } from 'react';
import { MatrixClient } from "matrix-js-sdk/src/client";
import { ValidatedServerConfig } from "../../../utils/AutoDiscoveryUtils";
import Login, { ISSOFlow } from "../../../Login";
interface IProps {
serverConfig: ValidatedServerConfig;
defaultDeviceDisplayName: string;
email?: string;
brand?: string;
clientSecret?: string;
sessionId?: string;
idSid?: string;
fragmentAfterLogin?: string;
onLoggedIn(params: {
userId: string;
deviceId: string;
homeserverUrl: string;
identityServerUrl?: string;
accessToken: string;
}, password: string): void;
makeRegistrationUrl(params: {
client_secret: string;
hs_url: string;
is_url?: string;
session_id: string;
}): void;
onLoginClick(): void;
onServerConfigChange(config: ValidatedServerConfig): void;
}
interface IState {
busy: boolean;
errorText?: ReactNode;
formVals: Record<string, string>;
doingUIAuth: boolean;
completedNoSignin: boolean;
flows: {
stages: string[];
}[];
serverIsAlive: boolean;
serverErrorIsFatal: boolean;
serverDeadError?: ReactNode;
matrixClient?: MatrixClient;
registeredUsername?: string;
differentLoggedInUserId?: string;
ssoFlow?: ISSOFlow;
}
export default class Registration extends React.Component<IProps, IState> {
loginLogic: Login;
constructor(props: any);
componentDidMount(): void;
UNSAFE_componentWillReceiveProps(newProps: any): void;
private replaceClient;
private onFormSubmit;
private requestEmailToken;
private onUIAuthFinished;
private setupPushers;
private onLoginClick;
private onGoToFormClicked;
private makeRegisterRequest;
private getUIAuthInputs;
private onLoginClickWithCheck;
private renderRegisterComponent;
render(): JSX.Element;
}
export {};