ด้วยการรวม Smart Lock สำหรับรหัสผ่านเข้ากับแอป Android ของคุณ คุณสามารถลงชื่อเข้าใช้ให้ผู้ใช้ในแอปของคุณโดยอัตโนมัติโดยใช้ข้อมูลประจำตัวที่บันทึกไว้ ผู้ใช้สามารถบันทึกทั้งข้อมูลประจำตัวของชื่อผู้ใช้และรหัสผ่านและข้อมูลประจำตัวของผู้ให้บริการข้อมูลประจำตัวแบบรวมศูนย์
บูรณาการล็อคสมาร์ทสำหรับรหัสผ่านใน app ของคุณโดยใช้ ข้อมูลประจำตัว API เพื่อดึงข้อมูลประจำตัวที่บันทึกไว้ในการลงชื่อเข้าใช้ ใช้ข้อมูลประจำตัวที่ดึงข้อมูลสำเร็จเพื่อลงชื่อเข้าใช้ผู้ใช้ หรือใช้ Credentials API เพื่อต้อนรับผู้ใช้ใหม่อย่างรวดเร็วโดยกรอกแบบฟอร์มการลงชื่อเข้าใช้แอปหรือลงชื่อสมัครใช้เพียงบางส่วน แจ้งผู้ใช้หลังจากลงชื่อเข้าใช้หรือลงทะเบียนเพื่อจัดเก็บข้อมูลรับรองสำหรับการตรวจสอบสิทธิ์อัตโนมัติในอนาคต
เห็นบาง กรณีศึกษา ที่ประสบความสำเร็จ Smart Lock สำหรับรหัสผ่านการผสานรวม
// Store user credentials with Auth.CredentialsApi.save() Auth.CredentialsApi.save(mCredentialsClient, credential).setResultCallback( new ResultCallback() { @Override public void onResult(Status status) { if (status.isSuccess()) { // Credentials were saved } else { if (status.hasResolution()) { // Try to resolve the save request. This will prompt the user if // the credential is new. try { status.startResolutionForResult(this, RC_SAVE); } catch (IntentSender.SendIntentException e) { // Could not resolve the request } } } } });

// Retrieve stored credentials with Auth.CredentialsApi.request() Auth.CredentialsApi.request(mCredentialsClient, mCredentialRequest).setResultCallback( new ResultCallback() { @Override public void onResult(CredentialRequestResult credentialRequestResult) { if (credentialRequestResult.getStatus().isSuccess()) { // Handle successful credential requests } else { // Handle unsuccessful and incomplete credential requests } } });
