總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Firebase Extensions 協助您減少應用程式的開發、維護和成長時間。
找到可滿足應用程式或專案需求的 Firebase Extension 後,只要安裝及設定擴充功能即可。如果需要多種擴充功能設定,您可以多次安裝擴充功能,每次安裝時使用不同的設定。
有了擴充功能,您不必花時間研究、編寫及偵錯程式碼,就能為應用程式或專案實作功能或自動執行工作。
如要安裝或管理擴充功能,您必須獲派下列任一角色:擁有者或編輯者,或 Firebase 管理員。
如要安裝擴充功能,專案必須採用 Blaze (即付即用) 方案。安裝擴充功能不會產生費用,但如果 Firebase 服務或 Cloud Secret Manager 等 Cloud 服務的用量超出免費方案配額,您可能需要支付相關費用。
您也可以使用 Extensions 模擬器 (Firebase Local Emulator Suite 的元件) 評估擴充功能,再將其安裝至專案。
Firebase 官方擴充功能
官方Firebase擴充功能是由 Firebase 和Firebase Extensions合作夥伴服務開發及測試,這些擴充功能安全可靠。
瀏覽 Firebase 擴充功能
在 Extensions Hub 中瀏覽 Firebase 擴充功能。
查看擴充功能的原始碼
如要尋找擴充功能的原始碼連結,請在 Extensions Hub 中點選擴充功能資訊卡上的「瞭解詳情」。
擴充功能原始碼的內容
擴充功能的來源目錄包含:
extension.yaml 檔案:包含擴充功能的 metadata,並定義建立的資源、Google API、運作所需的存取角色,以及擴充功能的所有使用者設定參數 (環境變數)
functions 目錄:包含擴充功能原始碼的檔案
README 檔案:列出擴充功能的後設資料 (但格式更易於閱讀),以及 PREINSTALL 檔案的內容
預先安裝檔案:說明擴充功能的運作方式、任何必要的預先安裝工作、設定需求,以及擴充功能的詳細資料
POSTINSTALL 檔案:說明具體的使用說明和任何進一步的整合需求
擴充功能的資源
每個 Firebase 專案都包含多種「資源」。專案資源可包括已部署的 Cloud Functions、資料庫執行個體、Cloud Storage 值區、Cloud Scheduler 工作和 Cloud Secret Manager 資料。
安裝擴充功能時,Firebase 會在專案中建立新的擴充功能專屬資源。擴充功能必須使用這些資源才能運作。
請注意,如果解除安裝擴充功能執行個體,Firebase 會刪除專為該擴充功能執行個體建立的所有資源 (例如一組函式),不過,下列項目不會遭到刪除:
使用Firebase控制台、Firebase CLI 或自動產生的 SDK {: #console-vs-cli}
您可以使用 Firebase 控制台或 Firebase CLI 安裝及管理擴充功能,也可以使用自動產生的 SDK 在程式碼中執行這項操作。
動作 |
Firebase console |
Firebase CLI |
自動產生的 SDK |
查看詳細資訊 (預先安裝) |
|
|
|
安裝 |
|
|
|
查看設定 (安裝後) |
|
|
|
編輯設定 |
|
|
|
更新版本 |
|
|
|
解除安裝 |
|
|
|
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["\u003cbr /\u003e\n\nFirebase Extensions help you reduce time spent on development, maintenance,\nand growth of your app.\n\nWhen you find a Firebase Extension that solves a need for your app\nor project, all you do is install and configure the extension. If you need\nmultiple configurations of the extension, you can install the extension multiple\ntimes, with a different configuration for each instance you install.\n\nWith extensions,\nyou don't spend time researching, writing, and debugging the code that\nimplements functionality or automates a task for your app or project.\n\nTo install or manage extensions, you must be assigned one of these roles:\n[Owner or Editor](/docs/projects/iam/roles-basic) or\n[Firebase Admin](/docs/projects/iam/roles-predefined-all-products).\n\nTo install an extension, your project must be on the **Blaze** (pay as you\ngo) plan. Although there is no charge for installing an extension, you might be\ncharged for your use of Firebase services or Cloud services such as\n[Cloud Secret Manager](https://cloud.google.com/secret-manager/pricing), if your usage exceeds the services' free\ntier.\n\nYou can also evaluate extensions before installing them on a project using the\nExtensions emulator, a component of the Firebase Local Emulator Suite.\n\nOfficial Firebase extensions\n\nThe **official Firebase extensions** are developed and tested by Firebase\nand Firebase Extensions partner services. These extensions are reliable and\nsecure.\n\nBrowse Firebase extensions\n\nBrowse Firebase extensions in the [Extensions Hub](https://extensions.dev/extensions).\n\nView the source code of an extension\n\nTo find a link to the source code for an extension,\nclick **Learn more** on the extension's card in the Extensions Hub.\n\nContents of an extension's source code\n\nAn extension's source directory includes:\n\n- **extension.yaml file** --- Contains the extension's metadata and defines\n the [resources](#resources) created, the Google APIs and\n [access roles](/docs/extensions/permissions-granted-to-extension) required for\n operation, and any user-configured parameters (environment variables) for the\n extension\n\n- **functions directory** --- Contains the files for the source code for the\n extension\n\n- **README file** --- Lists the extension's metadata (but in more\n human-readable format) as well as the content from the PREINSTALL file\n\n- **PREINSTALL file** --- Describes how the extension works, any necessary\n pre-installation tasks, configuration requirements, and details about the\n extension\n\n- **POSTINSTALL file** --- Describes specific usage instructions and any further\n integration requirements\n\nResources for an extension\n\nEvery Firebase project contains several types of \"resources\". Project resources\ncan include things like deployed Cloud Functions, database instances,\nCloud Storage buckets, Cloud Scheduler jobs, and Cloud Secret Manager data.\n\nWhen you install an extension, Firebase creates new *extension-instance-specific*\nresources in your project. These resources are required by the extension to\noperate.\n\nNote that, if you [uninstall an instance of an\nextension](/docs/extensions/manage-installed-extensions#uninstall), all the\nresources that Firebase created specifically for that instance of the extension\nto operate (like a set of functions) are deleted. However, the following are\n***not*** deleted:\n\n- Any artifacts created by the extension (like stored images).\n\n- Any other resources in your project, like a database instance or Cloud Storage\n bucket. Even if the extension interacted with these other resources, they\n are not *extension-specific*, so they aren't deleted if the extension is\n uninstalled.\n\nUsing the Firebase console, the Firebase CLI, or autogenerated SDKs {: #console-vs-cli}\n\nYou can install and manage extensions using\neither the\n[Firebase console](/docs/extensions/install-extensions?platform=console)\nor the\n[Firebase CLI](/docs/extensions/install-extensions?platform=cli),\nor in code using\n[autogenerated SDKs](/docs/extensions/install-extensions?platform=sdk).\n\n| **Action** | **Firebase console** | **Firebase CLI** | **Autogenerated SDK** |\n|----------------------------------------------|----------------------|------------------|-----------------------|\n| View detailed information (pre-installation) | | | |\n| Install | | | |\n| View configuration (post-installation) | | | |\n| Edit configuration | | | |\n| Update version | | | |\n| Uninstall | | | |\n\nNext Steps\n\n- View detailed information about an extension before you install the extension\n ([Extensions Hub](https://extensions.dev/extensions) or\n [Firebase CLI](/docs/extensions/install-extensions#view-details)).\n\n- Install an extension into your Firebase project using either the\n [Firebase console](/docs/extensions/install-extensions?platform=console),\n the [Firebase CLI](/docs/extensions/install-extensions?platform=cli).\n or [autogenerated SDKs](/docs/extensions/install-extensions?platform=sdk)."]]