mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-18 16:41:54 +08:00
- Replace password-based login with OAuth authentication - Add OAuth login and callback handlers - Support user whitelist via environment variables - Update login page to use OAuth flow - Remove legacy metrics-related authentication configuration - Enhance token management with username tracking
27 lines
765 B
TypeScript
27 lines
765 B
TypeScript
"use client"
|
|
|
|
import { Button } from "@/components/ui/button"
|
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
|
|
|
export default function LoginPage() {
|
|
const handleLogin = () => {
|
|
window.location.href = "/admin/api/auth"
|
|
}
|
|
|
|
return (
|
|
<div className="min-h-screen flex items-center justify-center bg-gray-100">
|
|
<Card className="w-[400px]">
|
|
<CardHeader>
|
|
<CardTitle className="text-2xl text-center">管理员登录</CardTitle>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<div className="space-y-4">
|
|
<Button onClick={handleLogin} className="w-full">
|
|
使用 Q58 账号登录
|
|
</Button>
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
</div>
|
|
)
|
|
}
|