diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx index 55f126a5e..bc8f2e1e4 100644 --- a/frontend/src/pages/login.tsx +++ b/frontend/src/pages/login.tsx @@ -13,7 +13,7 @@ import { useAuth, useLoginOptions, useUserInvalidate } from "@lib/hooks"; import { useState } from "react"; import { ThemeToggle } from "@ui/theme"; import { AUTH_TOKEN_STORAGE_KEY, MONITOR_BASE_URL } from "@main"; -import { Loader2 } from "lucide-react"; +import { Loader2, X } from "lucide-react"; import { cn } from "@lib/utils"; type OauthProvider = "Github" | "Google"; @@ -94,6 +94,10 @@ export const Login = () => { ); } + const no_auth_configured = + options !== undefined && + Object.values(options).every((value) => value === false); + // Otherwise just standard login return (
@@ -136,6 +140,12 @@ export const Login = () => { ) )} + {no_auth_configured && ( + + )}
{options?.local && ( @@ -182,6 +192,21 @@ export const Login = () => { )} + {no_auth_configured && ( + + No login methods have been configured. See the + + for information on configuring auth. + + )}