From 8cf030585f8de9def779af47bbd127455e453799 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Jul 2021 15:31:35 +0530 Subject: [PATCH] Fixed homeserver delegation issue --- src/client/action/auth.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/action/auth.js b/src/client/action/auth.js index 0403ec9f..e7b7c635 100644 --- a/src/client/action/auth.js +++ b/src/client/action/auth.js @@ -23,7 +23,7 @@ async function login(username, homeserver, password) { localStorage.setItem(cons.secretKey.ACCESS_TOKEN, response.access_token); localStorage.setItem(cons.secretKey.DEVICE_ID, response.device_id); localStorage.setItem(cons.secretKey.USER_ID, response.user_id); - localStorage.setItem(cons.secretKey.BASE_URL, response.well_known['m.homeserver'].base_url); + localStorage.setItem(cons.secretKey.BASE_URL, response?.well_known?.['m.homeserver']?.base_url || baseUrl); } async function getAdditionalInfo(baseUrl, content) { @@ -90,7 +90,6 @@ async function register(username, homeserver, password, email, recaptchaValue, t } else if (verified !== true) { session = null; clientSecret = client.generateClientSecret(); - console.log(clientSecret); const verifyData = await verifyEmail(baseUrl, { email, client_secret: clientSecret,