web: do not redirect automatically on login session expire

This commit is contained in:
Abdullah Atta
2023-08-05 09:50:47 +05:00
parent 506678e72c
commit 8eadc6aea1

View File

@@ -841,7 +841,9 @@ export function AuthForm<T extends AuthRoutes>(props: AuthFormProps<T>) {
} catch (e) {
const error = e as Error;
if (error.message === "invalid_grant") {
hardNavigate("/login");
setError(
"Login session has expired. Please refresh this page and try logging in again."
);
return;
}
setError(error.message);