forked from baron/baron-sso
OIDC 인증 라우트 및 로그인/콜백 페이지 구현
This commit is contained in:
23
devfront/src/features/auth/LoginPage.tsx
Normal file
23
devfront/src/features/auth/LoginPage.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { useAuth } from "react-oidc-context";
|
||||
|
||||
export default function LoginPage() {
|
||||
const auth = useAuth();
|
||||
|
||||
const handleLogin = () => {
|
||||
auth.signinRedirect();
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex h-screen w-full items-center justify-center bg-gray-100">
|
||||
<div className="w-full max-w-sm rounded-lg border bg-white p-8 shadow-sm">
|
||||
<h1 className="mb-6 text-center text-2xl font-bold text-gray-900">DevFront Login</h1>
|
||||
<button
|
||||
onClick={handleLogin}
|
||||
className="w-full rounded bg-blue-600 px-4 py-2 font-bold text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50"
|
||||
>
|
||||
Sign in with Baron SSO
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user