সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
App Check বেশ কয়েকটি প্রদানকারীর জন্য অন্তর্নির্মিত সমর্থন রয়েছে: অ্যাপল প্ল্যাটফর্মে ডিভাইসচেক এবং অ্যাপ অ্যাটেস্ট, অ্যান্ড্রয়েডে প্লে ইন্টিগ্রিটি এবং ওয়েব অ্যাপে reCAPTCHA এন্টারপ্রাইজ ( ওভারভিউ )। এগুলি ভালভাবে বোধগম্য সরবরাহকারী যা বেশিরভাগ বিকাশকারীদের চাহিদা পূরণ করা উচিত। তবে, আপনি আপনার নিজস্ব কাস্টম App Check প্রদানকারীকেও প্রয়োগ করতে পারেন। একটি কাস্টম প্রদানকারী ব্যবহার করা প্রয়োজন যখন:
আপনি অন্তর্নির্মিত বেশী ছাড়া অন্য একটি প্রদানকারী ব্যবহার করতে চান.
আপনি অসমর্থিত উপায়ে অন্তর্নির্মিত প্রদানকারী ব্যবহার করতে চান।
আপনি Apple, Android এবং ওয়েব ছাড়া অন্য প্ল্যাটফর্মগুলি ব্যবহার করে ডিভাইসগুলি যাচাই করতে চান৷ উদাহরণস্বরূপ, আপনি ডেস্কটপ ওএস বা ইন্টারনেট-অফ-থিংস ডিভাইসগুলির জন্য App Check প্রদানকারী তৈরি করতে পারেন।
আপনি যেকোনো প্ল্যাটফর্মে আপনার নিজস্ব যাচাইকরণ কৌশল প্রয়োগ করতে চান।
ওভারভিউ
একটি কাস্টম App Check প্রদানকারী বাস্তবায়ন করতে, আপনার একটি নিরাপদ ব্যাকএন্ড পরিবেশ প্রয়োজন যা Node.js Firebase Admin SDK চালাতে পারে। এটি Cloud Functions , ক্লাউড রানের মতো একটি ধারক প্ল্যাটফর্ম বা আপনার নিজস্ব সার্ভার হতে পারে৷
এই পরিবেশ থেকে, আপনি একটি নেটওয়ার্ক-অ্যাক্সেসযোগ্য পরিষেবা প্রদান করবেন যা আপনার অ্যাপ ক্লায়েন্টদের কাছ থেকে সত্যতার প্রমাণ পায়, এবং-যদি সত্যতার প্রমাণ আপনার সত্যতা মূল্যায়নে উত্তীর্ণ হয়-একটি App Check টোকেন ফেরত দেয়। আপনি প্রামাণিকতার প্রমাণ হিসাবে যে নির্দিষ্ট সূচকগুলি ব্যবহার করেন তা নির্ভর করবে আপনি যে তৃতীয়-পক্ষ প্রদানকারী ব্যবহার করছেন বা আপনার নিজের উদ্ভাবনের সূচকগুলির উপর, যদি আপনি কাস্টম যুক্তি প্রয়োগ করছেন।
সাধারণত, আপনি এই পরিষেবাটিকে একটি REST বা gRPC এন্ডপয়েন্ট হিসাবে প্রকাশ করেন তবে এই বিশদটি আপনার উপর নির্ভর করে।
একটি নেটওয়ার্ক-অভিগম্য এন্ডপয়েন্ট তৈরি করুন যা আপনার ক্লায়েন্টদের কাছ থেকে সত্যতা ডেটা গ্রহণ করতে পারে। উদাহরণস্বরূপ, Cloud Functions ব্যবহার করে:
// Create endpoint at https://example-app.cloudfunctions.net/fetchAppCheckTokenexports.fetchAppCheckToken=functions.https.onRequest((request,response)=>{// ...});
এন্ডপয়েন্ট যুক্তিতে যোগ করুন যা সত্যতা ডেটা মূল্যায়ন করে। এটি আপনার কাস্টম App Check প্রদানকারীর মূল যুক্তি, যা আপনাকে নিজেকে লিখতে হবে।
আপনি যদি ক্লায়েন্টটিকে প্রামাণিক বলে নির্ধারণ করেন, তাহলে একটি App Check টোকেন মিন্ট করতে Admin SDK ব্যবহার করুন এবং এটি এবং এর মেয়াদ শেষ হওয়ার সময় ক্লায়েন্টকে ফেরত দিন:
constadmin=require('firebase-admin');admin.initializeApp();// ...admin.appCheck().createToken(appId).then(function(appCheckToken){// Token expires in an hour.constexpiresAt=Math.floor(Date.now()/1000)+60*60;// Return appCheckToken and expiresAt to the client.}).catch(function(err){console.error('Unable to create App Check token.');console.error(err);});
আপনি যদি ক্লায়েন্টের সত্যতা যাচাই করতে না পারেন তবে একটি ত্রুটি ফেরত দিন (উদাহরণস্বরূপ, একটি HTTP 403 ত্রুটি ফেরত দিন)।
ঐচ্ছিক : createToken() এ একটি AppCheckTokenOptions অবজেক্ট পাস করে আপনার কাস্টম প্রদানকারী দ্বারা জারি করা App Check টোকেনের জন্য টাইম-টু-লাইভ (TTL) সেট করুন। আপনি TTL 30 মিনিট থেকে 7 দিনের মধ্যে যেকোনো মান সেট করতে পারেন। এই মান সেট করার সময়, নিম্নলিখিত ট্রেডঅফ সম্পর্কে সচেতন হন:
নিরাপত্তা: সংক্ষিপ্ত TTLগুলি শক্তিশালী নিরাপত্তা প্রদান করে, কারণ এটি সেই উইন্ডোকে হ্রাস করে যেখানে একটি ফাঁস হওয়া বা আটকানো টোকেন আক্রমণকারী দ্বারা অপব্যবহার করা যেতে পারে।
পারফরম্যান্স: ছোট TTL মানে আপনার অ্যাপ আরও ঘন ঘন প্রত্যয়ন করবে। যেহেতু অ্যাপ্লিকেশানের প্রত্যয়ন প্রক্রিয়াটি প্রতিবার সম্পাদিত হওয়ার সময় নেটওয়ার্ক অনুরোধগুলিতে বিলম্বিত করে, তাই একটি সংক্ষিপ্ত TTL আপনার অ্যাপের কর্মক্ষমতা প্রভাবিত করতে পারে।
বেশিরভাগ অ্যাপের জন্য 1 ঘন্টার ডিফল্ট TTL যুক্তিসঙ্গত।
পরবর্তী পদক্ষেপ
এখন যেহেতু আপনি আপনার কাস্টম প্রদানকারীর সার্ভার-সাইড লজিক প্রয়োগ করেছেন, আপনার Apple , Android , এবং ওয়েব ক্লায়েন্টদের থেকে এটি কীভাবে ব্যবহার করবেন তা শিখুন৷
[null,null,["2025-08-22 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["App Check has built-in support for several providers: DeviceCheck and App\nAttest on Apple platforms, Play Integrity on Android, and reCAPTCHA Enterprise\nin web apps ([overview](/docs/app-check)). These are well-understood providers\nthat should meet the needs of most developers. You can, however, also implement\nyour own custom App Check providers. Using a custom provider is necessary\nwhen:\n\n- You want to use a provider other than the built-in ones.\n\n- You want to use the built-in providers in unsupported ways.\n\n- You want to verify devices using platforms other than Apple, Android, and the\n web. For example, you could create App Check providers for desktop OSes or\n Internet-of-Things devices.\n\n- You want to implement your own verification techniques on any platform.\n\nOverview\n\nTo implement a custom App Check provider, you need a secure backend\nenvironment that can run the Node.js [Firebase Admin SDK](/docs/admin/setup).\nThis can be Cloud Functions, a container platform such as\n[Cloud Run](https://cloud.google.com/run), or your own server.\n\nFrom this environment, you will provide a network-accessible service that\nreceives proof of authenticity from your app clients, and---if the proof of\nauthenticity passes your authenticity assessment---returns an App Check\ntoken. The specific indicators you use as proof of authenticity will depend on\neither the third-party provider you're using, or the indicators of your own\ninvention, if you're implementing custom logic.\n\nUsually, you expose this service as a REST or gRPC endpoint, but this detail is\nup to you.\n\nCreate the token acquisition endpoint\n\n1. [Install and initialize the Admin SDK](/docs/admin/setup).\n\n2. Create a network-accessible endpoint that can receive authenticity data from\n your clients. For example, using Cloud Functions:\n\n // Create endpoint at https://example-app.cloudfunctions.net/fetchAppCheckToken\n exports.fetchAppCheckToken = functions.https.onRequest((request, response) =\u003e {\n // ...\n });\n\n3. Add to the endpoint logic that assesses the authenticity data. This is the\n core logic of your custom App Check provider, which you will need to\n write yourself.\n\n4. If you determine the client to be authentic, use the Admin SDK to mint\n an App Check token and return it and its expiration time to the client:\n\n const admin = require('firebase-admin');\n admin.initializeApp();\n\n // ...\n\n admin.appCheck().createToken(appId)\n .then(function (appCheckToken) {\n // Token expires in an hour.\n const expiresAt = Math.floor(Date.now() / 1000) + 60 * 60;\n\n // Return appCheckToken and expiresAt to the client.\n })\n .catch(function (err) {\n console.error('Unable to create App Check token.');\n console.error(err);\n });\n\n | **Note:** If you encounter a token signing error while creating a new token, make sure your service account has the required permissions. See the [Admin SDK troubleshooting guide](/docs/auth/admin/create-custom-tokens#troubleshooting).\n\n If you can't verify the client's authenticity, return an error (for example,\n return an HTTP 403 error).\n5. **Optional** : Set the time-to-live (TTL) for App Check tokens issued by\n your custom provider by passing an `AppCheckTokenOptions` object to\n `createToken()`. You can set the TTL to any value between 30 minutes and 7\n days. When setting this value, be aware of the following tradeoffs:\n\n - Security: Shorter TTLs provide stronger security, because it reduces the window in which a leaked or intercepted token can be abused by an attacker.\n - Performance: Shorter TTLs mean your app will perform attestation more frequently. Because the app attestation process adds latency to network requests every time it's performed, a short TTL can impact the performance of your app.\n\n The default TTL of 1 hour is reasonable for most apps.\n\nNext steps\n\nNow that you've implemented your custom provider's server-side logic, learn how\nto use it from your [Apple](/docs/app-check/ios/custom-provider),\n[Android](/docs/app-check/android/custom-provider), and [web](/docs/app-check/web/custom-provider) clients."]]