Firebase Authentication Cheatsheet

Quick reference for Firebase Authentication methods, providers, user management, and utilities.

MethodDescriptionExampleCategory
createUserWithEmailAndPasswordRegister a new usercreateUserWithEmailAndPassword(auth, "test@example.com", "password123")Email/Password
signInWithEmailAndPasswordSign in existing usersignInWithEmailAndPassword(auth, "test@example.com", "password123")Email/Password
sendEmailVerificationSend email verificationsendEmailVerification(user)Email/Password
sendPasswordResetEmailSend password reset emailsendPasswordResetEmail(auth, "test@example.com")Email/Password
GoogleAuthProviderSign in with Googleconst provider = new GoogleAuthProvider(); signInWithPopup(auth, provider)Providers
FacebookAuthProviderSign in with Facebookconst provider = new FacebookAuthProvider(); signInWithPopup(auth, provider)Providers
GithubAuthProviderSign in with GitHubconst provider = new GithubAuthProvider(); signInWithPopup(auth, provider)Providers
updateProfileUpdate user profileupdateProfile(user, { displayName: "John" })User Management
updateEmailUpdate user emailupdateEmail(user, "new@example.com")User Management
updatePasswordUpdate user passwordupdatePassword(user, "newPassword123")User Management
deleteUserDelete user accountdeleteUser(user)User Management
onAuthStateChangedListen to auth state changesonAuthStateChanged(auth, user => { console.log(user); })Utilities
signOutSign out usersignOut(auth)Utilities
getIdTokenGet user ID tokenconst token = await user.getIdToken()Utilities