Skip to content

Commit abe66aa

Browse files
duxovniJanBurp
authored andcommitted
Ensure the first device on a newly-registered account gets cross-signed properly (matrix-org#8750)
1 parent 016daab commit abe66aa

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

cypress/integration/1-register/register.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,10 @@ describe("Registration", () => {
6767

6868
cy.url().should('contain', '/#/home');
6969
cy.stopMeasuring("from-submit-to-home");
70+
71+
cy.get('[aria-label="User menu"]').click();
72+
cy.get('[aria-label="Security & Privacy"]').click();
73+
cy.get(".mx_DevicesPanel_myDevice .mx_DevicesPanel_deviceTrust .mx_E2EIcon")
74+
.should("have.class", "mx_E2EIcon_verified");
7075
});
7176
});

src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
274274
});
275275
};
276276

277-
private doBootstrapUIAuth = async (makeRequest: (authData: any) => void): Promise<void> => {
277+
private doBootstrapUIAuth = async (makeRequest: (authData: any) => Promise<void>): Promise<void> => {
278278
if (this.state.canUploadKeysWithPasswordOnly && this.state.accountPassword) {
279-
makeRequest({
279+
await makeRequest({
280280
type: 'm.login.password',
281281
identifier: {
282282
type: 'm.id.user',

src/components/views/dialogs/security/CreateCrossSigningDialog.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ export default class CreateCrossSigningDialog extends React.PureComponent<IProps
9191
}
9292
}
9393

94-
private doBootstrapUIAuth = async (makeRequest: (authData: any) => void): Promise<void> => {
94+
private doBootstrapUIAuth = async (makeRequest: (authData: any) => Promise<void>): Promise<void> => {
9595
if (this.state.canUploadKeysWithPasswordOnly && this.state.accountPassword) {
96-
makeRequest({
96+
await makeRequest({
9797
type: 'm.login.password',
9898
identifier: {
9999
type: 'm.id.user',
@@ -106,7 +106,7 @@ export default class CreateCrossSigningDialog extends React.PureComponent<IProps
106106
});
107107
} else if (this.props.tokenLogin) {
108108
// We are hoping the grace period is active
109-
makeRequest({});
109+
await makeRequest({});
110110
} else {
111111
const dialogAesthetics = {
112112
[SSOAuthEntry.PHASE_PREAUTH]: {

0 commit comments

Comments
 (0)