feat(auth): remove center api key from frontend login flow
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user