firebase-auth-basics by firebase/skills
npx skills add https://github.com/firebase/skills --skill firebase-auth-basicsnpx -y firebase-tools@latest projects:create 创建(参见 firebase-basics)。firebase-basics)。Firebase Authentication 提供后端服务、易于使用的 SDK 和现成的 UI 库,用于对应用的用户进行身份验证。
用户是可以登录到你的应用的实体。每个用户由一个在所有提供商中保证唯一的唯一 ID (uid) 标识。用户属性包括:
uid:唯一标识符。email:用户的电子邮件地址(如果可用)。displayName:用户的显示名称(如果可用)。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
photoURL:用户照片的 URL(如果可用)。emailVerified:布尔值,指示电子邮件是否已验证。Firebase Auth 支持多种登录方式:
Google 登录被推荐为一个良好且安全的默认提供商。
当用户登录时,他们会收到一个 ID 令牌 (JWT)。此令牌用于在向 Firebase 服务(Realtime Database、Cloud Storage、Firestore)或你自己的后端发出请求时识别用户。
只有 Google 登录、匿名身份验证和电子邮件/密码身份验证可以通过 CLI 启用。对于其他提供商,请使用 Firebase 控制台。
通过在 firebase.json 中添加一个 'auth' 块来配置 Firebase Authentication:
{
"auth": {
"providers": {
"anonymous": true,
"emailPassword": true,
"googleSignIn": {
"oAuthBrandDisplayName": "Your Brand Name",
"supportEmail": "support@example.com",
"authorizedRedirectUris": ["https://example.com"]
}
}
}
}
在 Firebase 控制台中启用其他提供商。
Web 参见 references/client_sdk_web.md。
在 Firestore/Storage 规则中使用 request.auth 来保护你的数据。
每周安装量
369
代码仓库
GitHub 星标数
182
首次出现
2026年2月11日
安全审计
安装于
gemini-cli357
opencode354
codex353
github-copilot346
amp342
kimi-cli342
npx -y firebase-tools@latest projects:create (see firebase-basics).firebase-basics).Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app.
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.Firebase Auth supports multiple ways to sign in:
Google Sign In is recommended as a good and secure default provider.
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.
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": "support@example.com",
"authorizedRedirectUris": ["https://example.com"]
}
}
}
}
Enable other providers in the Firebase Console.
Web See references/client_sdk_web.md.
Secure your data using request.auth in Firestore/Storage rules.
See references/security_rules.md.
Weekly Installs
369
Repository
GitHub Stars
182
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli357
opencode354
codex353
github-copilot346
amp342
kimi-cli342
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
105,000 周安装
Python类型注解模式指南:现代类型提示与Typing最佳实践
24 周安装
Web应用安全模式指南:OWASP Top 10防护、输入验证、身份认证与授权最佳实践
25 周安装
task-runner任务运行器:使用just简化项目命令执行,替代make的跨平台工具
30 周安装
EdgeOne Pages 一键部署:无需账户,秒级将HTML文件发布到公共URL
35 周安装
Vibe Security 安全扫描器 - 多语言代码漏洞检测与AI智能修复工具
38 周安装
wechat-publisher:一键发布Markdown文章到微信公众号草稿箱工具
323 周安装