firebase-auth-basics

tarafından firebase

Firebase Authentication'u birden çok kimlik sağlayıcı ile kurun ve veri erişimini güvence altına alın. E-posta/şifre, telefon numarası, anonim, federasyon sağlayıcıları (Google, Facebook, Twitter, GitHub, Microsoft, Apple) ve özel kimlik doğrulama entegrasyonunu destekler. Kullanıcılar, e-posta, görünen ad, fotoğraf URL'si ve e-posta doğrulama durumu gibi isteğe bağlı özelliklerle birlikte benzersiz UID'ler ile tanımlanır. CLI aracılığıyla kimlik doğrulama, Google ile Giriş, anonim kimlik doğrulama ve e-posta/şifre yöntemlerini etkinleştirir; diğer sağlayıcılar Firebase gerekt

npx skills add https://github.com/firebase/skills --skill firebase-auth-basics

Prerequisites

  • Firebase Project: Created via npx -y firebase-tools@latest projects:create (see firebase-basics).
  • Firebase CLI: Installed and logged in (see firebase-basics).

Core Concepts

Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app.

Users

A user is an entity that can sign in to your app. Each user is identified by a unique ID (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.

Identity Providers

Firebase Auth supports multiple ways to sign in:

  • Email/Password: Basic email and password authentication.
  • Federated Identity Providers: Google, Facebook, Twitter, GitHub, Microsoft, Apple, etc.
  • Phone Number: SMS-based authentication.
  • Anonymous: Temporary guest accounts that can be linked to permanent accounts later.
  • Custom Auth: Integrate with your existing auth system.

Google Sign In is recommended as a good and secure default provider.

Tokens

When a user signs in, they receive an ID Token (JWT). This token is used to identify the user when making requests to Firebase services (Realtime Database, Cloud Storage, Firestore) or your own backend.

  • ID Token: Short-lived (1 hour), verifies identity.
  • Refresh Token: Long-lived, used to get new ID tokens.

Workflow

1. Provisioning

Option 1. Enabling Authentication via CLI

Only Google Sign In, anonymous auth, and email/password auth can be enabled via CLI. For other providers, use the Firebase Console.

Configure Firebase Authentication in firebase.json by adding an 'auth' block:

{
  "auth": {
    "providers": {
      "anonymous": true,
      "emailPassword": true,
      "googleSignIn": {
        "oAuthBrandDisplayName": "Your Brand Name",
        "supportEmail": "[email protected]",
        "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, ensure localhost is included in the Authorized Domains list in the Firebase Console or via the authorizedDomains field in firebase.json. CRITICAL: Do NOT include the protocol or port number in the Authorized Domains list (e.g., use localhost, NOT http://localhost:9090).

CRITICAL: After configuring 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

Option 2. Enabling Authentication in Console

Enable other providers in the Firebase Console.

  1. Go to the https://console.firebase.google.com/project/_/authentication/providers
  2. Select your project.
  3. Enable the desired Sign-in providers (e.g., Email/Password, Google).

2. Client Setup & Usage

Web See references/client_sdk_web.md.

Flutter See references/flutter_setup.md. Android (Kotlin) See references/client_sdk_android.md.

3. Security Rules

Secure your data using request.auth in Firestore/Storage rules.

See references/security_rules.md.

firebase tarafından daha fazla skill

firebase-remote-config-basics
firebase
Firebase Remote Config için kapsamlı rehber; şablon yönetimi ve SDK kullanımını içerir. Kullanıcının Remote Config kurulumu, özellik bayraklarını yönetme veya uygulama davranışını dinamik olarak güncelleme konusunda yardıma ihtiyacı olduğunda bu beceriyi kullanın.
officialdevelopmentapi
developing-genkit-dart
firebase
We need to translate the given text from English to Turkish, preserving the name "developing-genkit-dart" if it appears, but it does not appear in the text. The text describes a unified AI SDK for Dart. We must not add any extra commentary, labels, or formatting. Just the translation. The text: "Unified AI SDK for Dart enabling code generation, structured outputs, tools, flows, and agents. Provides core APIs for generation, tool definition, flow orchestration, embeddings, and streaming with a single interface Includes 8+ plugins for LLM providers (Google Gemini, Anthropic Claude, OpenAI GPT), Firebase AI, Model Context Protocol, Chrome browser integration, and HTTP server hosting via Shelf Built-in CLI with local development UI for flow execution, tracing, model experimentation, and..." We need to translate accurately, preserving product names, protocol names, URLs, numbers, technical terms. So "Unified AI SDK for Dart" -> "Dart için Birleşik AI SDK'sı" but careful: "AI" is technical term, keep as AI.
official
developing-genkit-go
firebase
Go ile Genkit kullanarak yapay zeka destekli uygulamalar geliştirin. Kullanıcı Go'da Genkit ile AI özellikleri, ajanlar, akışlar veya araçlar oluşturmayı istediğinde veya bunlarla çalışırken kullanın.
official
developing-genkit-js
firebase
Genkit akışları, araçları ve çoklu model desteği ile AI destekli Node.js/TypeScript uygulamaları oluşturun. Genkit, sağlayıcıdan bağımsızdır; eklentiler aracılığıyla Google AI, OpenAI, Anthropic, Ollama ve diğer LLM sağlayıcılarını destekler. Zod ile tür güvenli şemalar kullanarak akışlar tanımlayın, üretim isteklerini yürütün ve TypeScript'te çok adımlı AI iş akışları oluşturun. Genkit CLI v1.29.0+ gerektirir; son büyük API değişiklikleri nedeniyle güncel kalıplar için önceki bilgilere değil, genkit docs:read ve common-errors.md dosyasına başvurmalısınız...
official
developing-genkit-python
firebase
Genkit kullanarak Python'da yapay zeka destekli uygulamalar geliştirin. Kullanıcı Python'da Genkit, AI ajanları, akışlar veya araçlar hakkında soru sorduğunda veya Genkit ile karşılaştığında kullanın…
official
firebase-ai-logic
firebase
We need to translate the given English text into Turkish, preserving the name "firebase-ai-logic" only if it appears in the source text. The source text does not contain that name; it's just the directory item type. So we translate the description only. The text is about client-side Gemini integration for web apps. We must preserve product names (Gemini, Gemini Nano, Chrome, Cloud Storage, App Check), protocol names, URLs (none), numbers (20 MB), and technical terms (multimodal inference, streaming, on-device hybrid execution, etc.). No extra commentary, no labels. Just the translation. Let's translate carefully: "Client-side Gemini integration for web apps with multimodal inference, streaming, and on-device hybrid execution." -> "Web uygulamaları için çok modlu çıkarım, akış ve cihaz üzerinde hibrit yürütme ile istemci tarafı Gemini entegrasyonu." "Supports text-only and multimodal inputs (images, audio, video, PDFs);
official
firebase-ai-logic-basics
firebase
Firebase AI Logic (Gemini API)'yi web uygulamalarına entegre etmek için resmi beceri. Kurulum, çok modlu çıkarım, yapılandırılmış çıktı ve güvenlik konularını kapsar.
official
firebase-app-hosting-basics
firebase
Firebase App Hosting ile Next.js, Angular ve diğer desteklenen framework'leri kullanarak full-stack web uygulamaları dağıtın ve yönetin. Blaze fiyatlandırma planında bir Firebase projesi gerektirir; Sunucu Taraflı Render (SSR) ve Artımlı Statik Rejenerasyon (ISR) iş akışlarını destekler. Firebase.json yapılandırması ve isteğe bağlı apphosting.yaml ile backend kurulumu yaparak dağıtım yapın veya GitHub entegrasyonu aracılığıyla otomatik "git push ile dağıt" özelliğini etkinleştirin. Hassas anahtarlara güvenli erişim için CLI komutlarıyla gizli yönetimi içerir...
official