diff --git a/.env b/.env deleted file mode 100644 index 7bc3e94..0000000 --- a/.env +++ /dev/null @@ -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 \ No newline at end of file diff --git a/src/synapse/authProvider.js b/src/synapse/authProvider.js index 723f155..691f757 100644 --- a/src/synapse/authProvider.js +++ b/src/synapse/authProvider.js @@ -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, - } + }) ) ), };