Auth
Twenty hooks covering every Firebase Auth client flow, plus the provider that holds them together.
Every Firebase Auth client flow, one hook each. They all follow the same contract, so learning one is learning the rest.
import {
AuthProvider,
useLogin,
AUTH_ERROR_MESSAGES,
} from '@timonwa/firebase-hooks/auth';Start here
AuthProvider / useAuth
The live user and custom claims for your whole tree, and the one place app-wide defaults live. Optional — hooks work without it.
useLogin
Email/password sign-in. The shortest path to seeing the result shape and onIdToken
in action.
Signing in and out
| Hook | What it does |
|---|---|
useLogin | Email/password sign-in |
useSignup | Signup with optional profile and verification email |
useLogout | Sign-out, your server session cleared first |
useOAuthSignIn | Any provider — popup or redirect, both halves handled |
useEmailLinkSignIn | Passwordless magic link, no window.prompt |
usePhoneSignIn | SMS code with a managed reCAPTCHA verifier |
useAnonymousSignIn | Guest sessions, upgradeable later |
useCustomTokenSignIn | Server-minted custom token |
Passwords
| Hook | What it does |
|---|---|
useSendPasswordResetEmail | The forgot-password email |
useConfirmPasswordReset | Complete a reset from the emailed code |
useUpdatePassword | Change it, reauthentication built in |
| Hook | What it does |
|---|---|
useSendEmailVerification | The resend-verification button |
useVerifyEmail | Apply the emailed code on mount |
useUpdateEmail | Change it via verify-before-update |
Account and linking
| Hook | What it does |
|---|---|
useUpdateProfile | Display name and photo URL |
useDeleteAccount | Delete, with reauth and server cleanup |
useReauthenticate | The recent-sign-in check, standalone |
useLinkProvider | Add a sign-in method — upgrade a guest |
useUnlinkProvider | Remove a sign-in method |
Not covered yet
Multi-factor auth (TOTP and SMS enrolment/resolution) and multi-tenancy are planned for a later minor. The Admin SDK is server-side and out of scope — see Compatibility.