This commit is contained in:
Vitalii Kiiko
2024-09-27 12:51:29 +02:00
parent 478af11cb9
commit 4be858ca74
19 changed files with 580 additions and 292 deletions

View File

@@ -1,7 +1,7 @@
import React, { useRef, useEffect, useState } from 'react';
import { __, sprintf } from '@wordpress/i18n';
import { classNames } from 'primereact/utils';
import { isEmpty } from 'ramda';
import { isEmpty, isNil } from 'ramda';
// store
import { storeSet, useStore } from '../../store';
@@ -22,7 +22,7 @@ const Login = () => {
const loginWithSpid = () => {
if (!loading) {
window.location.replace(`${API_BASE_URL}/saml2/authenticate/loginumbria`);
//window.location.replace(`${API_BASE_URL}/saml2/authenticate/loginumbria`);
}
}
@@ -63,7 +63,8 @@ const Login = () => {
useEffect(() => {
const temp_token = searchParams.get('temp_token');
if (temp_token) {
if (!isNil(temp_token) && !isEmpty(temp_token)) {
errorMsgs.current.clear();
AuthenticationService.validateExistingUser(temp_token, validateCallback, validateError);
}