ย้ายข้อมูลจาก Google Sign-In เดิมไปยัง Credential Manager และ AuthorizationClient
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ย้ายข้อมูลจาก Google Sign-In สำหรับ Android ไปยัง Credential Manager ของ Android เพื่อปรับปรุงประสบการณ์การตรวจสอบสิทธิ์ของแอปและเตรียมพร้อมรับการพัฒนาในอนาคต Google Sign-In สำหรับ Android เลิกใช้งานแล้วและจะถูกนําออกจาก Google Play Services Auth SDK
(com.google.android.gms:play-services-auth
) ในปี 2025
สําหรับการตรวจสอบสิทธิ์ นักพัฒนาแอปควรย้ายข้อมูลโปรเจ็กต์ Android ไปยัง Credential Manager ซึ่งรองรับขั้นตอน One Tap และปุ่มสําหรับฟีเจอร์ลงชื่อเข้าใช้ด้วย Google อย่างเต็มรูปแบบ ดูรายละเอียดได้ในบล็อกโพสต์
สําหรับการดำเนินการการให้สิทธิ์ที่จําเป็นต้องเข้าถึงข้อมูลผู้ใช้ที่ Google จัดเก็บไว้ เช่น Google ไดรฟ์ ให้ใช้ AuthorizationClient API
ย้ายข้อมูลการตรวจสอบสิทธิ์ไปยัง Credential Manager API
เครื่องมือจัดการข้อมูลเข้าสู่ระบบมีข้อดีหลายประการเหนือกว่า Google Sign-In รุ่นเดิมสำหรับ Android เนื่องจากมี API แบบรวมที่มีประสิทธิภาพซึ่งรองรับฟีเจอร์และแนวทางปฏิบัติสมัยใหม่ ในขณะเดียวกันก็ปรับปรุงประสบการณ์การตรวจสอบสิทธิ์ให้แก่ผู้ใช้
- ขั้นตอนที่เรียบง่ายและมีประสิทธิภาพมากขึ้นซึ่งสร้างด้วยเครื่องมือจัดการข้อมูลเข้าสู่ระบบได้ลดเวลาในการลงชื่อสมัครใช้และการลงชื่อเข้าใช้โดยเฉลี่ยได้สูงสุด 50%
- Credential Manager ผสานรวมการรองรับวิธีการลงชื่อเข้าใช้หลายวิธี ซึ่งรวมถึงฟีเจอร์ลงชื่อเข้าใช้ด้วย Google, พาสคีย์ และรหัสผ่าน
- Credential Manager คือ API แบบรวมที่ให้บริการอินเทอร์เฟซผู้ใช้ที่สอดคล้องกันมากขึ้นในอุปกรณ์ Android สอดคล้องกับมาตรฐานด้านความปลอดภัยที่พัฒนาขึ้นอยู่เสมอ และลดความซับซ้อนของกระบวนการพัฒนา
- เครื่องมือจัดการข้อมูลเข้าสู่ระบบมอบประสบการณ์การใช้งานที่สอดคล้องกันแบบรวมในการตรวจสอบสิทธิ์ทุกวิธี
- ตั้งแต่ Android 14 เป็นต้นไป เครื่องมือจัดการข้อมูลเข้าสู่ระบบจะรองรับผู้ให้บริการรหัสผ่านและพาสคีย์ของบุคคลที่สาม ซึ่งช่วยให้ผู้ใช้เลือกผู้ให้บริการข้อมูลเข้าสู่ระบบที่ต้องการได้
- Credential Manager รองรับปุ่มลงชื่อเข้าใช้ด้วย Google อย่างเต็มรูปแบบ นักพัฒนาแอปจึงวางปุ่มนี้ลงในขั้นตอนที่มีอยู่ได้โดยตรง
- Credential Manager รองรับความสามารถของ One Tap เพื่อให้นักพัฒนาแอปสามารถแจ้งให้ผู้ใช้ลงชื่อเข้าใช้ด้วยบัญชี Google ของตนได้โดยตรงด้วยการแตะเพียงครั้งเดียว
หากต้องการเริ่มการผสานรวมเครื่องมือจัดการข้อมูลเข้าสู่ระบบ ให้อ่านคู่มือนักพัฒนาแอป
อ่านเกี่ยวกับประสบการณ์ของผู้ใช้ในการรับรองด้วยพาสคีย์เพื่อทำความเข้าใจว่าควรออกแบบขั้นตอนการระบุตัวตนอย่างไร อ่านคำแนะนำผสานรวม Credential Manager กับฟีเจอร์ลงชื่อเข้าใช้ด้วย Google เพื่อดูรายละเอียดการใช้งาน OneTap หรือปุ่มลงชื่อเข้าใช้ด้วย Google
ย้ายข้อมูลการให้สิทธิ์ไปยัง AuthorizationClient API
ขณะนี้ฟังก์ชันการตรวจสอบสิทธิ์และการให้สิทธิ์จะพร้อมใช้งานเป็น 2 ขั้นตอนแยกกัน ซึ่งแตกต่างจากฟีเจอร์ลงชื่อเข้าใช้ด้วย Google เดิม Credential
Manager คือ API ที่คุณใช้สำหรับการตรวจสอบสิทธิ์ใน Android สําหรับการดำเนินการการให้สิทธิ์ เช่น การเข้าถึงบริการอย่าง Google ไดรฟ์ ให้ใช้ 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."]]