diff --git a/src/synapse/authProvider.test.ts b/src/synapse/authProvider.test.ts index 45335fc9..afb8a785 100644 --- a/src/synapse/authProvider.test.ts +++ b/src/synapse/authProvider.test.ts @@ -29,7 +29,17 @@ describe("authProvider", () => { expect(ret).toBe(undefined); expect(fetch).toBeCalledWith("http://example.com/_matrix/client/r0/login", { - body: '{"device_id":null,"initial_device_display_name":"Synapse Admin","type":"m.login.password","user":"@user:example.com","password":"secret"}', + body: JSON.stringify({ + device_id: null, + initial_device_display_name: "Synapse Admin", + type: "m.login.password", + user: "@user:example.com", + password: "secret", + identifier: { + type: "m.id.user", + user: "@user:example.com", + } + }), headers: new Headers({ Accept: "application/json", "Content-Type": "application/json", diff --git a/src/synapse/authProvider.ts b/src/synapse/authProvider.ts index d84fab1a..26d26ef5 100644 --- a/src/synapse/authProvider.ts +++ b/src/synapse/authProvider.ts @@ -31,6 +31,10 @@ const authProvider: AuthProvider = { type: "m.login.password", user: username, password: password, + identifier: { + type: "m.id.user", + user: username, + }, } ) ),