Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.
npx -y firebase-tools@latest projects:create (see firebase-basics).firebase-basics).uid) which is guaranteed to be unique across all providers. User
properties include:uid: Unique identifier.email: User's email address (if available).displayName: User's display name (if available).photoURL: URL to user's photo (if available).emailVerified: Boolean indicating if the email is verified.firebase.json by adding an 'auth' block:{
"auth": {
"providers": {
"anonymous": true,
"emailPassword": true,
"googleSignIn": {
"oAuthBrandDisplayName": "Your Brand Name",
"supportEmail": "support@example.com",
"authorizedRedirectUris": ["https://example.com", "http://localhost"]
}
}
}
}
[!NOTE] If the Google Sign-In popup opens and immediately closes with the error[firebase_auth/unauthorized-domain], it means the domain is not authorized. For local development, ensurelocalhostis included in the Authorized Domains list in the Firebase Console or via theauthorizedDomainsfield infirebase.json. CRITICAL: Do NOT include the protocol or port number in the Authorized Domains list (e.g., uselocalhost, NOT http://localhost:9090).
firebase.json, you MUST deploy the auth
configuration to the Firebase backend for the changes to take effect. This is
essential for auth providers like Google Sign-In, email/password, etc. to
auto-generate the necessary OAuth clients for your app platforms. Run:npx -y firebase-tools@latest deploy --only auth
request.auth in Firestore/Storage rules.