Add identifier when authorizing with password
This PR is almost copy of https://github.com/Awesome-Technologies/synapse-admin/pull/601 PR, authored by @dklimpel
This commit is contained in:
@@ -30,7 +30,7 @@ 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: '{"device_id":null,"initial_device_display_name":"Synapse Admin","type":"m.login.password","identifier":{"type":"m.id.user","user":"@user:example.com"},"password":"secret"}',
|
||||
headers: new Headers({
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
|
@@ -31,7 +31,10 @@ const authProvider: AuthProvider = {
|
||||
}
|
||||
: {
|
||||
type: "m.login.password",
|
||||
user: username,
|
||||
identifier: {
|
||||
type: "m.id.user",
|
||||
user: username,
|
||||
},
|
||||
password: password,
|
||||
}
|
||||
)
|
||||
|
Reference in New Issue
Block a user