clearKey on verify page if server send keyAttributes
This commit is contained in:
parent
99976dcb05
commit
2d7c9fa5a4
|
@ -18,6 +18,7 @@ import {
|
|||
} from 'services/userService';
|
||||
import { setIsFirstLogin } from 'utils/storage';
|
||||
import SubmitButton from 'components/SubmitButton';
|
||||
import { clearKeys } from 'utils/storage/sessionStorage';
|
||||
|
||||
const Image = styled.img`
|
||||
width: 350px;
|
||||
|
@ -74,6 +75,7 @@ export default function Verify() {
|
|||
clearFiles();
|
||||
setIsFirstLogin(true);
|
||||
if (resp.data.keyAttributes?.encryptedKey) {
|
||||
clearKeys();
|
||||
router.push('/credentials');
|
||||
} else {
|
||||
router.push('/generate');
|
||||
|
|
Loading…
Reference in a new issue