mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-21 15:25:22 +03:00
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:
parent
678867e981
commit
7747dc7f28
4 changed files with 7 additions and 3 deletions
2
.github/workflows/workflow.yml
vendored
2
.github/workflows/workflow.yml
vendored
|
@ -4,7 +4,7 @@ on:
|
|||
branches: [ "main" ]
|
||||
env:
|
||||
upstream_version: v0.10.3
|
||||
etke_version: etke2
|
||||
etke_version: etke3
|
||||
bunny_version: v0.1.0
|
||||
permissions:
|
||||
checks: write
|
||||
|
|
|
@ -25,6 +25,7 @@ The following changes are already implemented:
|
|||
|
||||
* [Prevent admins from deleting themselves](https://github.com/etkecc/synapse-admin/pull/1)
|
||||
* [Fix user's default tab not being shown](https://github.com/etkecc/synapse-admin/pull/8)
|
||||
* [Add identifier when authorizing with password](https://github.com/Awesome-Technologies/synapse-admin/pull/601)
|
||||
|
||||
_the list will be updated as new changes are added_
|
||||
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue