The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/auth > signInWithEmailAndPassword

signInWithEmailAndPassword() function

Asynchronously signs in using an email and password.

Signature:

export declare function signInWithEmailAndPassword(auth: Auth, email: string, password: string): Promise<UserCredential>;

Parameters

Parameter Type Description
auth Auth The Auth instance.
email string The users email address.
password string The users password.

Returns:

Promise<UserCredential>

Description

Fails with an error if the email address and password do not match.

Note: The user's password is NOT the password used to access the user's email account. The email address serves as a unique identifier for the user, and the password is used to access the user's account in your Firebase project. See also: createUserWithEmailAndPassword().