Web: Login: fix get sso

This commit is contained in:
Viktor Fomin 2022-02-01 17:44:12 +03:00
parent c8f1fc9f03
commit fbf0dcc6f5

View File

@ -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;