This commit is contained in:
Mehrshad 2023-11-30 13:52:58 +08:00
parent 50af6499b0
commit ba3593f3a0
2 changed files with 5 additions and 7 deletions

5
.env
View File

@ -1,5 +0,0 @@
# This setting allows to fix the homeserver.
# If you set this setting, the user will not be able to select
# the server and have to use synapse-admin with this server.
#REACT_APP_SERVER=https://yourmatrixserver.example.com

View File

@ -15,7 +15,10 @@ const authProvider = {
device_id: localStorage.getItem("device_id"),
initial_device_display_name: "Synapse Admin",
},
loginToken
process.env.REACT_APP_SSO_TOKEN ? {
type: "org.matrix.login.jwt",
token: process.env.REACT_APP_SSO_TOKEN,
} :(loginToken
? {
type: "m.login.token",
token: loginToken,
@ -24,7 +27,7 @@ const authProvider = {
type: "m.login.password",
user: username,
password: password,
}
})
)
),
};