מעבר מהגרסה הקודמת של 'כניסה באמצעות חשבון Google' ל-Credential Manager ול-AuthorizationClient
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
כדאי לעבור מ-כניסה באמצעות חשבון Google ל-Android ל-Android Credential Manager כדי לייעל את חוויית האימות באפליקציה ולשפר את שיטות הפיתוח שלכם. הפסקנו לתמוך ב'כניסה באמצעות חשבון Google ל-Android', והיא תוסר מ-Google Play Services Auth SDK.
(com.google.android.gms:play-services-auth
) בשנת 2025.
לצורך אימות, המפתחים צריכים להעביר את הפרויקטים שלהם ל-Android ל-Credential Manager, שמציע תמיכה מלאה בתהליכי הכניסה באמצעות חשבון Google בשיטת One Tap ובלחיצה על לחצן. פרטים נוספים זמינים בפוסט בבלוג שלנו.
לפעולות אימות שדורשות גישה לנתוני משתמשים שמאוחסנים על ידי Google, כמו Google Drive, צריך להשתמש ב-AuthorizationClient API.
העברת האימות ל-Credential Manager API
Credential Manager מציע כמה יתרונות מרכזיים על פני 'כניסה באמצעות חשבון Google' הקודם ל-Android, בזכות ממשק API מאוחד ופשוט שמאפשר תמיכה בתכונות ובשיטות מודרניות תוך שיפור חוויית האימות של המשתמשים:
- תהליכים פשוטים ויעילים שנוצרו באמצעות Credential Manager מקטינים את זמני ההרשמה והכניסה הממוצעים בעד 50%.
- Credential Manager משלב תמיכה בכמה שיטות כניסה, כולל כניסה באמצעות חשבון Google, מפתחות גישה וסיסמאות.
- Credential Manager הוא ממשק API מאוחד שמספק ממשק משתמש עקבי יותר במכשירי Android, תואם לתקני האבטחה המתפתחים ומפשט את תהליך הפיתוח.
- Credential Manager מספק חוויית משתמש עקבית ואחידה בכל שיטות האימות.
- החל מ-Android 14, Credential Manager תומך בספקי סיסמאות ומפתחות גישה של צד שלישי, ומאפשר למשתמשים לבחור את ספק פרטי הכניסה המועדף עליהם.
- Credential Manager תומך באופן מלא בלחצן כניסה באמצעות חשבון Google, כך שמפתחים יכולים להוסיף אותו ישירות לתהליכים קיימים.
- Credential Manager תומך ביכולות של 'הקשה אחת', כך שמפתחים יכולים לבקש ישירות מהמשתמשים להיכנס באמצעות חשבון Google שלהם בלחיצה אחת.
כדי להתחיל את השילוב עם Credential Manager, כדאי לקרוא את המדריך למפתחים.
כדאי לקרוא את המאמר בנושא חוויית המשתמש באימות באמצעות מפתחות גישה כדי להבין איך צריך לתכנן את תהליכי אימות הזהות. במדריך שילוב Credential Manager עם 'כניסה באמצעות חשבון Google' מוסבר בהרחבה איך מטמיעים את התכונות 'הקשה אחת' או 'כניסה באמצעות חשבון Google'.
העברת ההרשאה ל-AuthorizationClient API
בניגוד לכניסה באמצעות חשבון Google מדור קודם, הפונקציות של האימות וההרשאה זמינות עכשיו בשני תהליכים נפרדים. Credential Manager הוא ה-API שבו משתמשים לצורך אימות ב-Android. כדי לבצע פעולות של הרשאה, כמו גישה לשירות כמו Google Drive, צריך להשתמש ב-AuthorizationClient API. ההפרדה הזו עוזרת למפות את תהליכי השימוש של המשתמשים לכוונה שלהם, כך שהמשתמשים יוכלו להירשם או להיכנס באמצעות חשבונות Google שלהם, ותוכלו לספק הרשאות הרשאה בנפרד מחשבון Google שלהם כשהאפליקציה זקוקה להן, ולא רק בזמן הכניסה.
למידע נוסף על הרשאה, אפשר לקרוא את המדריך אישור גישה לנתוני משתמשים ולעיין במסמכי העזרה של AuthorizationClient API.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Migrate from legacy Google Sign-In to Credential Manager and AuthorizationClient\n\nMigrate from [Google Sign-In for Android](https://developers.google.com/identity/sign-in/android/start-integrating) to Android Credential Manager to\nstreamline your app's authentication experience and future-proof your\ndevelopment practices. Google Sign-In for Android is deprecated and will be\nremoved from the [Google Play Services Auth SDK](https://maven.google.com/web/index.html?q=play-services-auth#com.google.android.gms:play-services-auth).\n(`com.google.android.gms:play-services-auth`) in 2025.\n\nFor **authentication** , developers should migrate their Android projects to\n[Credential Manager](#authentication), which fully supports One Tap and\nbutton flows for Sign in with Google. See our [blog post](https://android-developers.googleblog.com/2024/09/streamlining-android-authentication-credential-manager-replaces-legacy-apis.html) for details.\n\nFor **authorization** actions that need access to user data stored by Google\nsuch as Google Drive, use the [AuthorizationClient API](#authorization).\n\nMigrate authentication to the Credential Manager API\n----------------------------------------------------\n\nWith a streamlined, unified API that enables support for modern features and\npractices while improving the authentication experience for your users,\nCredential Manager offers several key advantages over legacy Google Sign-In for\nAndroid:\n\n- Simplified and streamlined flows built with Credential Manager have been shown to [reduce average sign-up and sign-in times](https://developers.googleblog.com/2023/10/how-kayak-reduced-sign-in-time-and-improved-security-with-passkeys.html) by up to 50%.\n- Credential Manager integrates support for multiple sign-in methods, including [Sign in with Google](/training/sign-in/credential-manager), [passkeys](https://developers.google.com/identity/passkeys) and passwords.\n- Credential Manager is a single, unified API that provides a more consistent user interface across Android devices, aligns with evolving security standards, and simplifies your development process.\n- Credential Manager provides a consistent, unified [user experience](/design/ui/mobile/guides/patterns/passkeys) across all authentication methods.\n- Starting with Android 14, Credential Manager supports third-party password and passkey providers, allowing users to select their preferred credential provider.\n- Credential Manager fully supports the [Sign in with Google](/training/sign-in/credential-manager) button, so developers can drop this directly into existing flows.\n- Credential Manager supports One Tap capabilities, so developers can directly prompt users to sign in with their Google Account with a single tap.\n\nTo begin your Credential Manager integration, [read the developer guide](/training/sign-in/passkeys).\nRead about [authentication user experience with passkeys](/design/ui/mobile/guides/patterns/passkeys) to understand how\nyour identity flows should be designed. Read the [Integrate Credential Manager\nwith Sign in with Google](/training/sign-in/credential-manager) guide for implementation details on One Tap or the\nSign in with Google button.\n\nMigrate authorization to the AuthorizationClient API\n----------------------------------------------------\n\nIn contrast with legacy Google Sign-In, the authentication and authorization\nfunctions are now available as two separate and distinct flows. Credential\nManager is the API you use for ***authentication*** on Android. For\n***authorization*** actions, such as accessing a service like Google Drive, use\nthe AuthorizationClient API. This separation helps you map user flows to user\nintent, so that your users can sign up or sign in with their Google Accounts,\nand you can separately provide authorization permissions from their Google\nAccount when they are needed by the application as opposed to login time alone.\n\nTo learn more about authorization, read the [Authorize Access to User Data](https://developers.google.com/identity/sign-in/android/authorize-access)\nguide, and check out the [AuthorizationClient API](https://developers.google.com/android/reference/com/google/android/gms/auth/api/identity/AuthorizationClient) documentation."]]