RefirebaseRefirebase

handleEmailSignIn

Sign in with an email and password.

Usage

Authenticates a user via email and password. Returns { data, error } instead of throwing.

Example
import { auth } from 'refirebase';

const { data, error } = await auth.handleEmailSignIn('user@example.com', 'supersecret');

if (error) {
  console.error('Sign in failed:', error.message);
} else {
  console.log('Signed in as:', data?.user.email);
}

Parameters

ParamTypeDescription
email*stringThe user's email address.
password*stringThe user's password.

Return value

Returns

Promise<{ data: UserCredential | null, error?: RefirebaseError }>

An object containing the user credential data on success, or an error object on failure.