Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Firebase App Check
plat_iosplat_androidplat_webplat_flutter
App Check giúp bảo vệ các phần phụ trợ của ứng dụng khỏi hành vi sai trái bằng cách ngăn chặn các ứng dụng trái phép truy cập vào tài nguyên phụ trợ của bạn. Tính năng này hoạt động với cả các dịch vụ của Google (bao gồm cả các dịch vụ của Firebase và Google Cloud) và các chương trình phụ trợ tuỳ chỉnh của riêng bạn để giữ an toàn cho tài nguyên của bạn.
Với App Check, các thiết bị chạy ứng dụng của bạn sẽ sử dụng một nhà cung cấp chứng thực ứng dụng hoặc thiết bị để chứng thực một hoặc cả hai điều kiện sau:
Các yêu cầu bắt nguồn từ ứng dụng xác thực của bạn
Các yêu cầu xuất phát từ một thiết bị chính hãng, không bị giả mạo
Chứng thực này được đính kèm vào mọi yêu cầu mà ứng dụng của bạn gửi đến các API mà bạn chỉ định. Khi bạn bật chế độ thực thi App Check, các yêu cầu từ những máy khách không có chứng thực hợp lệ sẽ bị từ chối, cũng như mọi yêu cầu bắt nguồn từ một ứng dụng hoặc nền tảng mà bạn chưa uỷ quyền.
App Check có hỗ trợ tích hợp để sử dụng các dịch vụ sau đây làm nhà cung cấp chứng thực:
Nếu những dịch vụ này không đáp ứng được nhu cầu của bạn, bạn cũng có thể triển khai dịch vụ của riêng mình bằng cách sử dụng nhà cung cấp chứng thực bên thứ ba hoặc kỹ thuật chứng thực của riêng bạn.
App Check hoạt động với các dịch vụ sau đây của Google:
Các dịch vụ được hỗ trợ của Firebase và Google Cloud
Firebase Authentication (Xem trước)
Firebase Data Connect
Cloud Firestore
Firebase Realtime Database
Cloud Storage for Firebase
Cloud Functions for Firebase (chỉ các hàm có thể gọi)
Khi bạn bật App Check cho một dịch vụ và đưa SDK ứng dụng vào ứng dụng của mình, những điều sau đây sẽ xảy ra định kỳ:
Ứng dụng của bạn tương tác với nhà cung cấp mà bạn chọn để nhận chứng thực về tính xác thực của ứng dụng hoặc thiết bị (hoặc cả hai, tuỳ thuộc vào nhà cung cấp).
Quy trình chứng thực được gửi đến máy chủ App Check. Máy chủ này sẽ xác minh tính hợp lệ của quy trình chứng thực bằng các tham số đã đăng ký với ứng dụng, đồng thời trả về cho ứng dụng của bạn một mã thông báo App Check có thời gian hết hạn. Mã thông báo này có thể giữ lại một số thông tin về tài liệu chứng thực mà mã thông báo đã xác minh.
SDK ứng dụng App Check sẽ lưu mã thông báo vào bộ nhớ đệm trong ứng dụng của bạn, sẵn sàng được gửi cùng với mọi yêu cầu mà ứng dụng của bạn gửi đến các dịch vụ được bảo vệ.
Dịch vụ được bảo vệ bằng App Check chỉ chấp nhận các yêu cầu đi kèm với mã thông báo App Check hiện tại, hợp lệ.
App Check có mức độ bảo mật mạnh mẽ như thế nào?
App Check dựa vào sức mạnh của các nhà cung cấp dịch vụ chứng thực để xác định tính xác thực của ứng dụng hoặc thiết bị. Việc này ngăn chặn một số (nhưng không phải tất cả) vectơ tấn công nhắm vào các phần phụ trợ của bạn. Việc sử dụng App Check không đảm bảo loại bỏ được tất cả hành vi sai trái, nhưng bằng cách tích hợp với App Check, bạn đang thực hiện một bước quan trọng để bảo vệ các tài nguyên phụ trợ của mình khỏi hành vi sai trái.
App Check có liên quan như thế nào đến Firebase Authentication?
App Check và Firebase Authentication là những phần bổ sung cho câu chuyện bảo mật của ứng dụng. Firebase Authentication cung cấp tính năng xác thực người dùng để bảo vệ người dùng của bạn, trong khi App Check cung cấp chứng thực tính xác thực của ứng dụng hoặc thiết bị để bảo vệ bạn (nhà phát triển). App Check bảo vệ quyền truy cập vào các tài nguyên phụ trợ của Google và các phụ trợ tuỳ chỉnh bằng cách yêu cầu các lệnh gọi API phải chứa mã thông báo App Check hợp lệ. Hai khái niệm này phối hợp với nhau để giúp bảo mật ứng dụng của bạn.
Hạn mức và giới hạn
Việc bạn sử dụng App Check phải tuân theo hạn mức và giới hạn của các nhà cung cấp chứng thực mà bạn sử dụng.
Quyền truy cập DeviceCheck và App Attest phải tuân theo mọi hạn mức hoặc giới hạn do Apple đặt ra.
API Tính toàn vẹn của Play có hạn mức hằng ngày là 10.000 lượt gọi cho cấp sử dụng API Chuẩn. Để biết thông tin về cách nâng cấp cấp sử dụng, hãy xem tài liệu về API Tính toàn vẹn của Play.
reCAPTCHA Enterprise miễn phí cho 10.000 lượt đánh giá mỗi tháng và có tính phí cho số lượt đánh giá vượt quá hạn mức này. Xem giá của reCAPTCHA.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-23 UTC."],[],[],null,["Firebase App Check \nplat_ios plat_android plat_web plat_flutter \n\nApp Check helps protect your app backends from abuse by preventing\nunauthorized clients from accessing your backend resources. It works with\nboth Google services (including Firebase and Google Cloud services) and your\nown custom backends to keep your resources safe.\n\nWith App Check, devices running your app will use an app or device\nattestation provider that attests to one or both of the following:\n\n- Requests originate from your authentic app\n- Requests originate from an authentic, untampered device\n\nThis attestation is attached to every request your app makes to the APIs you\nspecify. When you enable App Check enforcement, requests from\nclients without a valid attestation will be rejected, as will any request\noriginating from an app or platform you haven't authorized.\n\nApp Check has built-in support for using the following services as\nattestation providers:\n\n- [DeviceCheck](https://developer.apple.com/documentation/devicecheck) or [App Attest](https://developer.apple.com/documentation/devicecheck/establishing_your_app_s_integrity) on Apple platforms\n- [Play Integrity](https://developer.android.com/google/play/integrity) on Android\n- [reCAPTCHA Enterprise](https://cloud.google.com/recaptcha-enterprise) on web apps.\n\nIf these are insufficient for your needs, you can also implement your own\nservice that uses either a third-party attestation provider or your own\nattestation techniques.\n\nApp Check works with the following Google services:\n\n| Supported Firebase and Google Cloud services |\n|------------------------------------------------------------------------------------------------------------|\n| Firebase Authentication (Preview) |\n| Firebase Data Connect |\n| Cloud Firestore |\n| Firebase Realtime Database |\n| Cloud Storage for Firebase |\n| Cloud Functions for Firebase (callable functions only) |\n| Firebase AI Logic |\n| [Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/overview) (Preview) |\n| [Places API (New)](https://developers.google.com/maps/documentation/places/web-service/overview) (Preview) |\n| [Google Identity for iOS](https://developers.google.com/identity/sign-in/ios/appcheck) |\n\nYou can also use App Check to protect your non-Google custom backend\nresources, like your own self-hosted backend.\n\n[Learn how to get started](#get_started)\n\nHow does it work?\n\nWhen you enable App Check for a service and include the client SDK\nin your app, the following happens periodically:\n\n1. Your app interacts with the provider of your choice to obtain an attestation of the app or device's authenticity (or both, depending on the provider).\n2. The attestation is sent to the App Check server, which verifies the validity of the attestation using parameters registered with the app, and returns to your app an App Check token with an expiration time. This token might retain some information about the attestation material it verified.\n3. The App Check client SDK caches the token in your app, ready to be sent along with any requests your app makes to protected services.\n\nA service protected by App Check only accepts requests accompanied\nby a current, valid App Check token.\n\nHow strong is the security provided by App Check?\n\nApp Check relies on the strength of its attestation providers to determine\napp or device authenticity. It prevents some, but not all, abuse vectors\ndirected towards your backends. Using App Check does not guarantee\nthe elimination of all abuse, but by integrating with App Check, you are\ntaking an important step towards abuse protection for your backend resources.\n\nHow is App Check related to Firebase Authentication?\n\nApp Check and Firebase Authentication are complementary parts of your app security\nstory. Firebase Authentication provides user authentication, which protects your\nusers, whereas App Check provides attestation of app or device authenticity,\nwhich protects you, the developer. App Check guards access to your Google\nbackend resources and custom backends by requiring API calls to contain a valid\nApp Check token. These two concepts work together to help secure your app.\n\nQuotas \\& limits\n\nYour use of App Check is subject to the quotas and limits of the attestation\nproviders you use.\n\n- DeviceCheck and App Attest access is subject to any quotas or limitations set\n by Apple.\n\n- Play Integrity has a daily quota of 10,000 calls for its Standard API usage\n tier. For information on raising your usage tier, see the\n [Play Integrity documentation](https://developer.android.com/google/play/integrity/overview#usage-tiers).\n\n- reCAPTCHA Enterprise is no-cost for 10,000 assessments each month, and has a\n cost beyond that. See [reCAPTCHA pricing](https://cloud.google.com/security/products/recaptcha#pricing).\n\nGet started\n\nReady to get started?\n\nApple platforms\n\n[DeviceCheck](/docs/app-check/ios/devicecheck-provider)\n[App Attest](/docs/app-check/ios/app-attest-provider)\n\nAndroid\n\n[Play Integrity](/docs/app-check/android/play-integrity-provider)\n\nWeb\n\n[reCAPTCHA Enterprise](/docs/app-check/web/recaptcha-enterprise-provider)\n\nFlutter\n\n[Default providers](/docs/app-check/flutter/default-providers)\n\nUnity\n\n[Default providers](/docs/app-check/unity/default-providers)\n\nC++\n\n[Default providers](/docs/app-check/cpp/default-providers)\n\nLearn how to implement a custom App Check provider\n\n[Custom providers](/docs/app-check/custom-provider)\n\nLearn how to use App Check to protect your custom backend resources\n\nSelect your platform:\n\n[iOS+](/docs/app-check/ios/custom-resource)\n[Android](/docs/app-check/android/custom-resource)\n[Web](/docs/app-check/web/custom-resource)\n[Flutter](/docs/app-check/flutter/custom-resource)\n[Unity](/docs/app-check/unity/custom-resource)\n[C++](/docs/app-check/cpp/custom-resource)"]]