mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
protect from zombie auth
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user