feat(auth): remove center api key from frontend login flow

This commit is contained in:
nav
2026-05-14 14:17:12 +00:00
parent cfaa1cb657
commit 4f28f102e0
5 changed files with 20 additions and 25 deletions

View File

@@ -7,7 +7,6 @@ export default function LoginPage() {
const navigate = useNavigate()
const { login, isAuthed, session } = useAuth()
const [centerApiBase, setCenterApiBase] = useState('http://localhost:7001/api')
const [centerApiKey, setCenterApiKey] = useState('')
const [email, setEmail] = useState('')
const [password, setPassword] = useState('')
const [error, setError] = useState('')
@@ -16,7 +15,7 @@ export default function LoginPage() {
e.preventDefault()
setError('')
try {
await login(centerApiBase.trim(), centerApiKey.trim(), email, password)
await login(centerApiBase.trim(), email, password)
navigate('/workspace')
} catch {
setError('Login failed. Please check your email and password.')
@@ -34,12 +33,6 @@ export default function LoginPage() {
onChange={(e) => setCenterApiBase(e.target.value)}
placeholder="Center API Base (e.g. http://localhost:7001/api)"
/>
<input
className="input"
value={centerApiKey}
onChange={(e) => setCenterApiKey(e.target.value)}
placeholder="Center API Key"
/>
<input className="input" value={email} onChange={(e) => setEmail(e.target.value)} placeholder="Email" type="email" />
<input
className="input"