fix company creation for admin and inviting of new employees
This commit is contained in:
@@ -34,20 +34,18 @@ import {
|
||||
import { Spinner } from '@kit/ui/spinner';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import pathsConfig from '~/config/paths.config';
|
||||
|
||||
export function MultiFactorChallengeContainer({
|
||||
paths,
|
||||
userId,
|
||||
}: React.PropsWithChildren<{
|
||||
userId: string;
|
||||
paths: {
|
||||
redirectPath: string;
|
||||
};
|
||||
}>) {
|
||||
const router = useRouter();
|
||||
|
||||
const verifyMFAChallenge = useVerifyMFAChallenge({
|
||||
onSuccess: () => {
|
||||
router.replace('/');
|
||||
router.replace(pathsConfig.app.home);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -206,6 +204,10 @@ function useVerifyMFAChallenge({ onSuccess }: { onSuccess: () => void }) {
|
||||
});
|
||||
|
||||
if (response.error) {
|
||||
console.warn(
|
||||
{ error: response.error.message },
|
||||
'Failed to verify MFA challenge',
|
||||
);
|
||||
throw response.error;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user