From fbf0dcc6f5c52ed3a185273983c7e1e4f66cdce9 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 1 Feb 2022 17:44:12 +0300 Subject: [PATCH] Web: Login: fix get sso --- web/ASC.Web.Login/src/Login.jsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/web/ASC.Web.Login/src/Login.jsx b/web/ASC.Web.Login/src/Login.jsx index abf2937860..5cd8ff578b 100644 --- a/web/ASC.Web.Login/src/Login.jsx +++ b/web/ASC.Web.Login/src/Login.jsx @@ -105,13 +105,15 @@ const Form = (props) => { localStorage.removeItem("code"); }; - useEffect(() => { - getCapabilities().then((data) => { - console.log(data); - setSsoLabel(data.ssoLabel); - setSsoUrl(data.ssoUrl); - }); + const getSso = async () => { + const data = await getCapabilities(); + console.log(data); + setSsoLabel(data.ssoLabel); + setSsoUrl(data.ssoUrl); + }; + useEffect(() => { + getSso(); const profile = localStorage.getItem("profile"); if (!profile) return;