จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Firebase App Check
plat_ios
plat_android
plat_web
plat_flutter
App Check ช่วยปกป้องแบ็กเอนด์ของแอปจากการละเมิดโดยการป้องกันไม่ให้ไคลเอ็นต์ที่ไม่ได้รับอนุญาตเข้าถึงทรัพยากรแบ็กเอนด์ โดยจะทำงานร่วมกับทั้งบริการของ Google (รวมถึง Firebase และบริการ Google Cloud) และแบ็กเอนด์ที่กำหนดเองของคุณเพื่อรักษาทรัพยากรให้ปลอดภัย
เมื่อใช้ App Check อุปกรณ์ที่เรียกใช้แอปของคุณจะใช้ผู้ให้บริการการรับรองแอปหรืออุปกรณ์
ที่รับรองสิ่งใดสิ่งหนึ่งหรือทั้ง 2 อย่างต่อไปนี้
- คำขอมาจากแอปที่ถูกต้องของคุณ
- คำขอมาจากอุปกรณ์จริงที่ไม่มีการดัดแปลง
การรับรองนี้จะแนบไปกับทุกคำขอที่แอปของคุณส่งไปยัง API ที่คุณระบุ เมื่อเปิดใช้การบังคับใช้ App Check ระบบจะปฏิเสธคำขอจาก
ไคลเอ็นต์ที่ไม่มีการรับรองที่ถูกต้อง รวมถึงคำขอใดๆ ที่
มาจากแอปหรือแพลตฟอร์มที่คุณไม่ได้ให้สิทธิ์
App Check มีการรองรับในตัวสำหรับการใช้บริการต่อไปนี้เป็น
ผู้ให้บริการการรับรอง
หากไม่เพียงพอต่อความต้องการ คุณยังสามารถใช้บริการของคุณเองที่ใช้ผู้ให้บริการการรับรองบุคคลที่สามหรือเทคนิคการรับรองของคุณเองได้
App Check ทำงานร่วมกับบริการของ Google ต่อไปนี้
บริการ Firebase และ Google Cloud ที่รองรับ |
Firebase Authentication (ตัวอย่าง) |
Firebase Data Connect |
Cloud Firestore |
Firebase Realtime Database |
Cloud Storage for Firebase |
Cloud Functions for Firebase (ฟังก์ชันที่เรียกใช้ได้เท่านั้น) |
Firebase AI Logic |
บริการของ Google Maps Platform ที่รองรับ |
Maps JavaScript API (ตัวอย่าง) |
Places API (ใหม่) (ตัวอย่าง) |
บริการอื่นๆ ของ Google ที่รองรับ |
Google Identity สำหรับ iOS |
นอกจากนี้ คุณยังใช้ App Check เพื่อปกป้องทรัพยากรแบ็กเอนด์ที่กำหนดเองที่ไม่ใช่ของ Google
ได้ด้วย เช่น แบ็กเอนด์ที่โฮสต์ด้วยตนเอง
ดูวิธีเริ่มต้นใช้งาน
วิธีการทำงาน
เมื่อเปิดใช้ App Check สำหรับบริการและรวม SDK ของไคลเอ็นต์
ไว้ในแอป ระบบจะดำเนินการต่อไปนี้เป็นระยะๆ
- แอปของคุณจะโต้ตอบกับผู้ให้บริการที่คุณเลือกเพื่อขอการรับรอง
ความถูกต้องของแอปหรืออุปกรณ์ (หรือทั้ง 2 อย่าง ขึ้นอยู่กับผู้ให้บริการ)
- ระบบจะส่งการรับรองไปยังเซิร์ฟเวอร์ App Check ซึ่งจะยืนยันความถูกต้องของการรับรองโดยใช้พารามิเตอร์ที่ลงทะเบียนไว้กับแอป และส่งโทเค็น App Check ที่มีเวลาหมดอายุกลับไปยังแอปของคุณ โทเค็นนี้อาจเก็บข้อมูลบางอย่างเกี่ยวกับเนื้อหาการรับรองที่โทเค็น
ยืนยัน
- App Check SDK ของไคลเอ็นต์จะแคชโทเค็นในแอปของคุณ ซึ่งพร้อมที่จะส่ง
พร้อมกับคำขอใดๆ ที่แอปของคุณส่งไปยังบริการที่ได้รับการปกป้อง
บริการที่ได้รับการปกป้องโดย App Check จะยอมรับเฉพาะคำขอที่มาพร้อมกับโทเค็น App Check ที่ใช้งานได้และถูกต้องในปัจจุบัน
App Check ให้การรักษาความปลอดภัยได้มากน้อยเพียงใด
App Check อาศัยความแข็งแกร่งของผู้ให้บริการการรับรองเพื่อพิจารณา
ความถูกต้องของแอปหรืออุปกรณ์ ซึ่งจะป้องกันเวกเตอร์การละเมิดบางส่วน แต่ไม่ใช่ทั้งหมด
ที่มุ่งเป้าไปยังแบ็กเอนด์ของคุณ การใช้ App Check ไม่ได้รับประกัน
ว่าจะกำจัดการละเมิดทั้งหมดได้ แต่การผสานรวมกับ App Check จะช่วยให้คุณ
ก้าวไปอีกขั้นที่สำคัญในการปกป้องการละเมิดสำหรับทรัพยากรแบ็กเอนด์
App Check และ Firebase Authentication เป็นส่วนประกอบที่เสริมกันในเรื่องราวความปลอดภัยของแอป
Firebase Authentication มีการตรวจสอบสิทธิ์ผู้ใช้ซึ่งจะปกป้องผู้ใช้ของคุณ
ในขณะที่ App Check มีการรับรองความถูกต้องของแอปหรืออุปกรณ์
ซึ่งจะปกป้องคุณในฐานะนักพัฒนาแอป App Check จะปกป้องการเข้าถึงทรัพยากรแบ็กเอนด์ของ Google
และแบ็กเอนด์ที่กำหนดเองโดยกำหนดให้การเรียก API ต้องมีโทเค็น App Check ที่ถูกต้อง แนวคิดทั้ง 2 นี้ทำงานร่วมกันเพื่อช่วยรักษาความปลอดภัยของแอป
โควต้าและขีดจำกัด
การใช้ App Check ของคุณขึ้นอยู่กับโควต้าและขีดจำกัดของผู้ให้บริการรับรองที่คุณใช้
การเข้าถึง DeviceCheck และ App Attest จะขึ้นอยู่กับโควต้าหรือข้อจำกัดที่ Apple กำหนด
Play Integrity มีโควต้าการเรียกใช้ 10,000 ครั้งต่อวันสำหรับระดับการใช้งาน API มาตรฐาน
ดูข้อมูลเกี่ยวกับการเพิ่มระดับการใช้งานได้ที่เอกสารประกอบของ Play Integrity
reCAPTCHA Enterprise ไม่มีค่าใช้จ่ายสำหรับการประเมิน 10,000 ครั้งในแต่ละเดือน และมี
ค่าใช้จ่ายเพิ่มเติมหากใช้เกิน ดูราคาของ reCAPTCHA
เริ่มต้นใช้งาน
หากพร้อมที่จะเริ่มแล้ว
DeviceCheck
App Attest
Android
Play Integrity
เว็บ
reCAPTCHA Enterprise
Flutter
ผู้ให้บริการเริ่มต้น
Unity
ผู้ให้บริการเริ่มต้น
C++
ผู้ให้บริการเริ่มต้น
ดูวิธีใช้App Checkผู้ให้บริการ
ผู้ให้บริการที่กำหนดเอง
ดูวิธีใช้ App Check เพื่อปกป้องทรัพยากรแบ็กเอนด์ที่กำหนดเอง
เลือกแพลตฟอร์ม
iOS+
Android
เว็บ
Flutter
Unity
C++
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-23 UTC
[null,null,["อัปเดตล่าสุด 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)"]]