Skip to main content

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 submission
  • onGoogleSignIn: Function to handle Google OAuth sign-in
  • onEmailSignIn: 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.