From de274600b77082ff49f3ca94c2f883ab91db29b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6berl?= Date: Wed, 21 Feb 2024 17:19:12 +0100 Subject: [PATCH] Show only enabled authentication mechanisms --- src/app/page.tsx | 6 +++++- src/features/auth-page/login.tsx | 14 ++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 91616adfd..41000a6d9 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -5,7 +5,11 @@ export default async function Home() { await redirectIfAuthenticated(); return (
- +
); } diff --git a/src/features/auth-page/login.tsx b/src/features/auth-page/login.tsx index 9c07a05c7..675f8d592 100644 --- a/src/features/auth-page/login.tsx +++ b/src/features/auth-page/login.tsx @@ -14,6 +14,8 @@ import { interface LoginProps { isDevMode: boolean; + githubEnabled: boolean; + entraIdEnabled: boolean; } export const LogIn: FC = (props) => { @@ -31,13 +33,17 @@ export const LogIn: FC = (props) => { - - - {props.isDevMode ? ( + {props.githubEnabled && ( + + )} + {props.entraIdEnabled && ( + + )} + {props.isDevMode && ( - ) : null} + )} );