diff --git a/frontend/src/providers/AuthProvider.tsx b/frontend/src/providers/AuthProvider.tsx index 4ef9f6fe4..38b0b19a1 100644 --- a/frontend/src/providers/AuthProvider.tsx +++ b/frontend/src/providers/AuthProvider.tsx @@ -13,7 +13,6 @@ export enum UserRefreshState { NeverLoggedIn, LoggedIn, ForceLoggedOut, - LoggedInForceAccountRedir, } export type AuthProps = { @@ -109,12 +108,6 @@ export function AuthProvider({ children }: PropsWithChildren<{}>) { i18n: i18n.language, }); } - if (!user.accepted_toh) { - const isAnyChainAdmin = !!user.chains.find((uc) => !!uc.chain_uid); - if (isAnyChainAdmin) { - return UserRefreshState.LoggedInForceAccountRedir; - } - } } catch (err) { await authLogout().catch((err) => { console.error("force logout failed:", err); @@ -136,13 +129,6 @@ export function AuthProvider({ children }: PropsWithChildren<{}>) { if (!(isHome || isHomeI18n)) { history.push("/"); } - } else if (res === UserRefreshState.LoggedInForceAccountRedir) { - const isAdminI18n = - history.location.pathname.substring(3) === "/admin/dashboard"; - const isAdmin = history.location.pathname === "/admin/dashboard"; - if (!(isAdmin || isAdminI18n)) { - history.push("/admin/dashboard"); - } } });