LoginForm
The LoginForm
component handles user authentication with email/OTP and Google OAuth.
Usage
import LoginForm from "@/components/LoginForm";
function LoginPage() {
return (
<div>
<h1>Login</h1>
<LoginForm />
</div>
);
}
Props
onSubmit
: Function to handle form submissiononGoogleSignIn
: Function to handle Google OAuth sign-inonEmailSignIn
: Function to handle email/OTP sign-in
Functionality
- Handles form submission for both email/OTP and Google OAuth
- Displays loading state during authentication
- Provides feedback to the user with toast notifications
Customization
This component can be customized by passing different props to handle different authentication flows.