protect from zombie auth

This commit is contained in:
Igor Loskutov
2025-09-03 10:53:03 -04:00
parent 611e258d96
commit 0cbbd24c65
9 changed files with 222 additions and 213 deletions

View File

@@ -26,6 +26,7 @@ const TranscriptCreate = () => {
const router = useRouter();
const auth = useAuth();
const isAuthenticated = auth.status === "authenticated";
const isAuthRefreshing = auth.status === "refreshing";
const isLoading = auth.status === "loading";
const requireLogin = featureEnabled("requireLogin");
@@ -133,7 +134,7 @@ const TranscriptCreate = () => {
<Center>
{isLoading ? (
<Spinner />
) : requireLogin && !isAuthenticated ? (
) : requireLogin && !isAuthenticated && !isAuthRefreshing ? (
<Button onClick={() => auth.signIn("authentik")}>Log in</Button>
) : (
<Flex