diff --git a/web/src/views/LoginPortal/SecondFactor/OneTimePasswordMethod.tsx b/web/src/views/LoginPortal/SecondFactor/OneTimePasswordMethod.tsx index 935756e1..e4bae173 100644 --- a/web/src/views/LoginPortal/SecondFactor/OneTimePasswordMethod.tsx +++ b/web/src/views/LoginPortal/SecondFactor/OneTimePasswordMethod.tsx @@ -31,8 +31,10 @@ const OneTimePasswordMethod = function (props: Props) { const redirectionURL = useRedirectionURL(); const { onSignInSuccess, onSignInError } = props; - const onSignInErrorCallback = useCallback(onSignInError, [onSignInError]); - const onSignInSuccessCallback = useCallback(onSignInSuccess, [onSignInSuccess]); + /* eslint-disable react-hooks/exhaustive-deps */ + const onSignInErrorCallback = useCallback(onSignInError, []); + const onSignInSuccessCallback = useCallback(onSignInSuccess, []); + /* eslint-enable react-hooks/exhaustive-deps */ const signInFunc = useCallback(async () => { if (props.authenticationLevel === AuthenticationLevel.TwoFactor) { diff --git a/web/src/views/LoginPortal/SecondFactor/PushNotificationMethod.tsx b/web/src/views/LoginPortal/SecondFactor/PushNotificationMethod.tsx index 8847d1b9..3a6a0100 100644 --- a/web/src/views/LoginPortal/SecondFactor/PushNotificationMethod.tsx +++ b/web/src/views/LoginPortal/SecondFactor/PushNotificationMethod.tsx @@ -30,8 +30,10 @@ const PushNotificationMethod = function (props: Props) { const mounted = useIsMountedRef(); const { onSignInSuccess, onSignInError } = props; - const onSignInErrorCallback = useCallback(onSignInError, [onSignInError]); - const onSignInSuccessCallback = useCallback(onSignInSuccess, [onSignInSuccess]); + /* eslint-disable react-hooks/exhaustive-deps */ + const onSignInErrorCallback = useCallback(onSignInError, []); + const onSignInSuccessCallback = useCallback(onSignInSuccess, []); + /* eslint-enable react-hooks/exhaustive-deps */ const signInFunc = useCallback(async () => { if (props.authenticationLevel === AuthenticationLevel.TwoFactor) { diff --git a/web/src/views/LoginPortal/SecondFactor/SecurityKeyMethod.tsx b/web/src/views/LoginPortal/SecondFactor/SecurityKeyMethod.tsx index 8f4c99a0..97a4e22b 100644 --- a/web/src/views/LoginPortal/SecondFactor/SecurityKeyMethod.tsx +++ b/web/src/views/LoginPortal/SecondFactor/SecurityKeyMethod.tsx @@ -38,8 +38,10 @@ const SecurityKeyMethod = function (props: Props) { const [timerPercent, triggerTimer,] = useTimer(signInTimeout * 1000 - 500); const { onSignInSuccess, onSignInError } = props; - const onSignInErrorCallback = useCallback(onSignInError, [onSignInError]); - const onSignInSuccessCallback = useCallback(onSignInSuccess, [onSignInSuccess]); + /* eslint-disable react-hooks/exhaustive-deps */ + const onSignInErrorCallback = useCallback(onSignInError, []); + const onSignInSuccessCallback = useCallback(onSignInSuccess, []); + /* eslint-enable react-hooks/exhaustive-deps */ const doInitiateSignIn = useCallback(async () => { // If user is already authenticated, we don't initiate sign in process.