import { useState } from 'react'; import { authClient } from '~/lib/auth-client'; export default function SignIn() { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const signIn = async () => { await authClient.signIn.email( { email, password, }, { onRequest: (ctx) => { // show loading state }, onSuccess: (ctx) => { // redirect to home }, onError: (ctx) => { alert(ctx.error); }, }, ); }; return (

Sign In

setEmail(e.target.value)} /> setPassword(e.target.value)} />
); }