با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
FIDO2 API به برنامههای Android اجازه میدهد تا اعتبارنامههای قوی مبتنی بر کلید عمومی تأیید شده را برای احراز هویت کاربران ایجاد و استفاده کنند. API یک پیادهسازی WebAuthn Client را ارائه میکند که از استفاده از احراز هویت رومینگ BLE، NFC و USB (کلیدهای امنیتی) و همچنین یک تأییدکننده پلتفرم پشتیبانی میکند که به کاربر اجازه میدهد با استفاده از اثر انگشت یا قفل صفحه خود احراز هویت کند.
زمانی که کاربر یک احراز هویت را با یک حساب مرتبط میکند، ثبتنام یکبار برای هر احراز هویت انجام میشود.
هر زمان که طرف متکی بخواهد یک کاربر را احراز هویت کند، امضا انجام می شود.
هر دو ثبت نام و امضا نیاز به تعامل کاربر دارند.
قابلیت همکاری با وب سایت شما
ساده است که به کاربران اجازه دهید به طور یکپارچه اعتبارنامه ها را در وب سایت و برنامه اندروید شما به اشتراک بگذارند. برای انجام این کار، از پیوندهای دارایی دیجیتال استفاده کنید. میتوانید با میزبانی فایل JSON پیوندهای دارایی دیجیتال در وبسایت خود، و افزودن پیوندی به فایل پیوند دارایی دیجیتال به مانیفست برنامه خود، ارتباط خود را اعلام کنید.
برای مثال، اگر میخواهید https://example.com با یک برنامه Android com.example.android مرتبط کنید، در اینجا 3 مرحله لازم وجود دارد:
مرحله 1. assetlinks.json در دامنه خود میزبانی کنید
یک فایل JSON مانند این ایجاد کنید و آن را در https://example.com/.well-known/assetlinks.json میزبانی کنید.
مرحله 3. یک منبع رشته asset_statements به فایل strings.xml اضافه کنید
رشته asset_statements یک شی JSON است که فایلهای assetlinks.json را برای بارگیری مشخص میکند. شما باید از هرگونه آپستروف و علامت نقل قولی که در رشته استفاده می کنید فرار کنید. به عنوان مثال:
تاریخ آخرین بهروزرسانی 2025-03-10 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-03-10 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe FIDO2 API enables Android apps to utilize strong, attested public key-based credentials for user authentication, supporting BLE, NFC, USB roaming authenticators, and platform authenticators like fingerprint or screen lock.\u003c/p\u003e\n"],["\u003cp\u003eIt facilitates user registration (associating an authenticator with an account) and signing (authenticating a user) through the Fido2ApiClient.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage Digital Asset Links to allow users to seamlessly share credentials between their website and Android application.\u003c/p\u003e\n"],["\u003cp\u003eEstablishing this interoperability involves hosting an assetlinks.json file on the website, linking to it in the app's manifest, and adding an asset_statements string resource to the strings.xml file.\u003c/p\u003e\n"]]],[],null,["# FIDO2 API for Android\n\nThe FIDO2 API allows Android applications to create and use strong, attested\npublic key- based credentials for the purpose of authenticating users. The API\nprovides a [WebAuthn Client](https://www.w3.org/TR/webauthn/#webauthn-client)\nimplementation, which supports the use of BLE, NFC, and USB roaming\nauthenticators (security keys) as well as a platform authenticator, which allows\nthe user to authenticate using their fingerprint or screen lock.\n| **Note:** If your app requires passkeys, you should use [Credential Manager](/identity/android-credential-manager) instead.\n\nIntegration\n-----------\n\nThe [FIDO2 API](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/package-summary)\nentry point is the [Fido2ApiClient](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/Fido2ApiClient).\n\nThe API supports two operations:\n\n- [Registration](/android/reference/com/google/android/gms/fido/fido2/Fido2ApiClient#getRegisterIntent(com.google.android.gms.fido.fido2.api.common.MakeCredentialOptions)) is done once per authenticator per account, when the user associates an authenticator with an account.\n- [Signing](/android/reference/com/google/android/gms/fido/fido2/Fido2ApiClient#getSignIntent(com.google.android.gms.fido.fido2.api.common.PublicKeyCredentialRequestOptions)) is done whenever the relying party wants to authenticate a user.\n\nBoth registration and signing require user interaction.\n\nInteroperability with your website\n----------------------------------\n\nIt is simple to allow users to seamlessly share credentials across your website\nand Android application. To do so, leverage [the Digital Asset Links](https://digitalassetlinks.org).\nYou can declare associations by hosting a Digital Asset Links JSON file on your\nwebsite, and adding a link to the Digital Asset Link file to your app's manifest.\n\nFor example, if you want to associate `https://example.com` with an Android app\n`com.example.android`, here's 3 required steps:\n\n### Step 1. Host `assetlinks.json` at your domain\n\nCreate a JSON file like this and host it at `https://example.com/.well-known/assetlinks.json`. \n\n [\n {\n \"relation\" : [\n \"delegate_permission/common.handle_all_urls\",\n \"delegate_permission/common.get_login_creds\"\n ],\n \"target\" : {\n \"namespace\" : \"web\",\n \"site\" : \"https://example.com\"\n }\n },\n {\n \"relation\" : [\n \"delegate_permission/common.handle_all_urls\",\n \"delegate_permission/common.get_login_creds\"\n ],\n \"target\" : {\n \"namespace\" : \"android_app\",\n \"package_name\" : \"com.example.android\",\n \"sha256_cert_fingerprints\" : [\n \"DE:AD:BE:EF\"\n ]\n }\n }\n ]\n\nMake sure it's crawlable from Google and is served with HTTP header\n`Content-Type: application/json`.\n\n`sha256_cert_fingerprints` is the SHA256 fingerprints of your app's signing certificate.\nFind more details in the [Android App Links documentation](https://developer.android.com/training/app-links/verify-site-associations#web-assoc).\n| **Note:** The `relation` will eventually only require `\"delegate_permission/common.get_login_creds\"` in order to share credentials between websites and apps, however, until we complete migrating our logic to accept it, please include both `\"delegate_permission/common.handle_all_urls\"` and `\"delegate_permission/common.get_login_creds\"`.\n\n### Step 2. Link to `assetlinks.json` in Android app\n\nIn your Android app, add the following line to the manifest file under `\u003capplication\u003e`: \n\n \u003cmeta-data android:name=\"asset_statements\" android:resource=\"@string/asset_statements\" /\u003e\n\n### Step 3. Add an `asset_statements` string resource to the strings.xml file\n\nThe `asset_statements` string is a JSON object that specifies the `assetlinks.json`\nfiles to load. You must escape any apostrophes and quotation marks you use in\nthe string. For example: \n\n \u003cstring name=\"asset_statements\" translatable=\"false\"\u003e\n [{\n \\\"include\\\": \\\"https://example.com/.well-known/assetlinks.json\\\"\n }]\n \u003c/string\u003e\n\nTo learn more about associating your app and your website, read the [SmartLock\nfor Passwords on Android documentation](/identity/smartlock-passwords/android/associate-apps-and-sites)."]]