From 0bc1ce32268657cd84b5c47f04962b7bf35324c3 Mon Sep 17 00:00:00 2001 From: Manuel Stahl Date: Tue, 4 May 2021 17:10:09 +0200 Subject: [PATCH] Reuse device_id for synapse-admin on login Change-Id: I47bbfd1e33ef8bffb618101ae233aeb093cf0ada --- src/synapse/authProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/synapse/authProvider.js b/src/synapse/authProvider.js index 972d599..f36b9d1 100644 --- a/src/synapse/authProvider.js +++ b/src/synapse/authProvider.js @@ -10,6 +10,7 @@ const authProvider = { type: "m.login.password", user: username, password: password, + device_id: localStorage.getItem("device_id"), initial_device_display_name: "Synapse Admin", }), }; @@ -48,7 +49,6 @@ const authProvider = { if (typeof access_token === "string") { fetchUtils.fetchJson(logout_api_url, options).then(({ json }) => { localStorage.removeItem("access_token"); - localStorage.removeItem("device_id"); }); } return Promise.resolve();