internal frontend implementation with keycloak authentication
This commit is contained in:
22
internal_frontend/components/login-screen.tsx
Normal file
22
internal_frontend/components/login-screen.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
'use client';
|
||||
|
||||
import {useEffect} from "react";
|
||||
import {signIn} from "next-auth/react";
|
||||
import {Loader2} from "lucide-react"; // optional loading spinner
|
||||
import {cn} from "@/lib/utils"; // optional: your className utility
|
||||
|
||||
export default function LoginScreen() {
|
||||
useEffect(() => {
|
||||
// Immediately redirect to Keycloak
|
||||
signIn("keycloak");
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center bg-muted">
|
||||
<div className="flex flex-col items-center gap-2 text-center">
|
||||
<Loader2 className={cn("h-6 w-6 animate-spin text-muted-foreground")}/>
|
||||
<p className="text-sm text-muted-foreground">Leite zur Anmeldung weiter ...</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user