Ensure the first device on a newly-registered account gets cross-signed properly (#8750)

This commit is contained in:
Faye Duxovni
2022-06-03 08:57:52 -04:00
committed by GitHub
parent ef6bd3540d
commit 2f7f36ac85
3 changed files with 10 additions and 5 deletions
@@ -67,5 +67,10 @@ describe("Registration", () => {
cy.url().should('contain', '/#/home'); cy.url().should('contain', '/#/home');
cy.stopMeasuring("from-submit-to-home"); cy.stopMeasuring("from-submit-to-home");
cy.get('[aria-label="User menu"]').click();
cy.get('[aria-label="Security & Privacy"]').click();
cy.get(".mx_DevicesPanel_myDevice .mx_DevicesPanel_deviceTrust .mx_E2EIcon")
.should("have.class", "mx_E2EIcon_verified");
}); });
}); });
@@ -274,9 +274,9 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
}); });
}; };
private doBootstrapUIAuth = async (makeRequest: (authData: any) => void): Promise<void> => { private doBootstrapUIAuth = async (makeRequest: (authData: any) => Promise<void>): Promise<void> => {
if (this.state.canUploadKeysWithPasswordOnly && this.state.accountPassword) { if (this.state.canUploadKeysWithPasswordOnly && this.state.accountPassword) {
makeRequest({ await makeRequest({
type: 'm.login.password', type: 'm.login.password',
identifier: { identifier: {
type: 'm.id.user', type: 'm.id.user',
@@ -91,9 +91,9 @@ export default class CreateCrossSigningDialog extends React.PureComponent<IProps
} }
} }
private doBootstrapUIAuth = async (makeRequest: (authData: any) => void): Promise<void> => { private doBootstrapUIAuth = async (makeRequest: (authData: any) => Promise<void>): Promise<void> => {
if (this.state.canUploadKeysWithPasswordOnly && this.state.accountPassword) { if (this.state.canUploadKeysWithPasswordOnly && this.state.accountPassword) {
makeRequest({ await makeRequest({
type: 'm.login.password', type: 'm.login.password',
identifier: { identifier: {
type: 'm.id.user', type: 'm.id.user',
@@ -106,7 +106,7 @@ export default class CreateCrossSigningDialog extends React.PureComponent<IProps
}); });
} else if (this.props.tokenLogin) { } else if (this.props.tokenLogin) {
// We are hoping the grace period is active // We are hoping the grace period is active
makeRequest({}); await makeRequest({});
} else { } else {
const dialogAesthetics = { const dialogAesthetics = {
[SSOAuthEntry.PHASE_PREAUTH]: { [SSOAuthEntry.PHASE_PREAUTH]: {