با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
قبل از اینکه ورود به سیستم One Tap را به برنامه خود اضافه کنید، API های Google و پروژه های Android خود را تنظیم کنید.
پروژه کنسول Google APIs خود را تنظیم کنید
پروژه خود را در کنسول API باز کنید یا اگر قبلاً ندارید پروژه ای ایجاد کنید.
در صفحه نمایش رضایت OAuth، مطمئن شوید که همه اطلاعات کامل و دقیق هستند. به ویژه، مطمئن شوید که آدرس های اینترنتی خط مشی رازداری برنامه و شرایط خدمات خود را مشخص کرده اید.
اگر قبلاً ندارید، در صفحه اعتبارنامه، یک شناسه کلاینت Android برای برنامه خود ایجاد کنید. شما باید نام بسته برنامه و امضای SHA-1 را مشخص کنید.
اگر قبلاً شناسه مشتری برنامه وب را ندارید، در صفحه اعتبارنامه ها، یک شناسه سرویس گیرنده برنامه وب ایجاد کنید. می توانید فیلدهای Authorized JavaScript Origins و Authorized Redirect URIs را خالی بگذارید. این شناسه مشتری نشان دهنده سرور پشتیبان احراز هویت شما است. (شما از این شناسه کلاینت هنگام تماس با Google API از سرور خود استفاده می کنید، اما حتی اگر به آن نیاز ندارید.)
اگر وبسایتی دارید که باطن ورود به سیستم برنامهتان را به اشتراک میگذارد، یک فایل پیوند دارایی دیجیتال ایجاد و منتشر کنید تا کاربرانی که در یک پلتفرم وارد میشوند بتوانند به راحتی از پلتفرم دیگر وارد شوند.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Get started with One Tap sign-in and sign-up\n\n| **Caution:** One Tap for Android is deprecated. To ensure the continued security and usability of your app, [migrate to\n| Credential Manager](/identity/sign-in/credential-manager). Credential Manager supports passkey, password, and federated identity authentication (such as Sign-in with Google), stronger security, and a more consistent user experience.\n\nBefore you add One Tap sign-in to your app, set up your Google APIs and Android\nprojects.\n\nSet up your Google APIs console project\n---------------------------------------\n\n1. Open your project in the [API Console](https://console.cloud.google.com/), or create a project if you don't already have one.\n2. On the OAuth consent screen page, make sure all of the information is complete and accurate. In particular, make sure you have specified the URLs of your app's privacy policy and terms of service.\n3. On the Credentials page, create an Android client ID for your app if you don't already have one. You will need to specify your app's package name and SHA-1 signature.\n 1. Go to the [Credentials page](https://console.cloud.google.com/apis/credentials).\n 2. Click **Create credentials \\\u003e OAuth client ID**.\n 3. Select the **Android** application type.\n4. On the Credentials page, create a web application client ID if you don't already have one. You can leave the Authorized JavaScript Origins and Authorized redirect URIs fields blank. This client ID represents your authentication backend server. (You would use this client ID when calling Google APIs from your server, but you need it even if you don't.)\n 1. Go to the [Credentials page](https://console.cloud.google.com/apis/credentials).\n 2. Click **Create credentials \\\u003e OAuth client ID**.\n 3. Select the **Web application** application type.\n\nInclude dependencies in your Android project\n--------------------------------------------\n\n1. In your project-level `build.gradle` file, make sure to include Google's Maven repository (`google()`) in both your `buildscript` and `allprojects` sections.\n2. Add the dependencies for [Google Play services](https://developers.google.com/android)' authentication libraries\n to your module (app-level) build file (usually `app/build.gradle`):\n\n apply plugin: 'com.android.application'\n\n dependencies {\n // ...\n\n implementation 'com.google.android.gms:play-services-auth:21.3.0'\n }\n\nOptional: Associate your app with your site\n-------------------------------------------\n\nIf you have a web site that shares your app's sign-in backend,\n[create and publish a digital asset links file](https://developers.google.com/identity/smartlock-passwords/android/associate-apps-and-sites)\nso that users who sign in on one platform can easily sign in on the other.\n\nNext steps\n----------\n\n[Add One Tap sign-in flows to your app](/identity/legacy/one-tap/legacy-get-saved-credentials)."]]