Firebase Authentication Cheatsheet
Quick reference for Firebase Authentication methods, providers, user management, and utilities.
| Method | Description | Example | Category |
|---|---|---|---|
| createUserWithEmailAndPassword | Register a new user | createUserWithEmailAndPassword(auth, "test@example.com", "password123") | Email/Password |
| signInWithEmailAndPassword | Sign in existing user | signInWithEmailAndPassword(auth, "test@example.com", "password123") | Email/Password |
| sendEmailVerification | Send email verification | sendEmailVerification(user) | Email/Password |
| sendPasswordResetEmail | Send password reset email | sendPasswordResetEmail(auth, "test@example.com") | Email/Password |
| GoogleAuthProvider | Sign in with Google | const provider = new GoogleAuthProvider(); signInWithPopup(auth, provider) | Providers |
| FacebookAuthProvider | Sign in with Facebook | const provider = new FacebookAuthProvider(); signInWithPopup(auth, provider) | Providers |
| GithubAuthProvider | Sign in with GitHub | const provider = new GithubAuthProvider(); signInWithPopup(auth, provider) | Providers |
| updateProfile | Update user profile | updateProfile(user, { displayName: "John" }) | User Management |
| updateEmail | Update user email | updateEmail(user, "new@example.com") | User Management |
| updatePassword | Update user password | updatePassword(user, "newPassword123") | User Management |
| deleteUser | Delete user account | deleteUser(user) | User Management |
| onAuthStateChanged | Listen to auth state changes | onAuthStateChanged(auth, user => { console.log(user); }) | Utilities |
| signOut | Sign out user | signOut(auth) | Utilities |
| getIdToken | Get user ID token | const token = await user.getIdToken() | Utilities |