restore-credentials

Implement Android Restore Credentials with androidx.credentials for silent sign-in on new devices.

2|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/IsKenKenYa/skills --skill restore-credentials-iskenkenya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: restore-credentials
Source: https://github.com/IsKenKenYa/skills/tree/main/skills/android/identity/restore-credentials
Command: npx skills add https://github.com/IsKenKenYa/skills --skill restore-credentials-iskenkenya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires androidx.credentials, androidx.credentials-play-services-auth, and includes references (resource) components.

What problem does it solve? Users who restore their app on a new Android device normally have to sign in again, causing friction and drop-off. This Skill guides the client-side implementation of Android's Restore Credentials feature so users are silently logged back in after a device restore. ## Core Features & Use Cases - Restore Key Lifecycle: Create a restore key on sign-in or sign-up, retrieve it during device setup, and delete it on sign-out via clearCredentialState(). - Two-Tier Restoration Architecture: Implements background restoration through BackupAgent.onRestoreFinished() plus a foreground fallback in the launcher Activity, with correct handling of allowBackup and fullBackupOnly. - Backend Handoff Checklist: After client implementation, presents the developer with mandatory backend guidelines covering key TTL, multi-device mapping, and orphaned key cleanup. - Use Case: An Android app using Credential Manager wants users who restore from a cloud backup to be automatically signed in on their new phone without touching the existing password or passkey flows. ## Quick Start Implement Android Restore Credentials in my app using the androidx.credentials library so users are silently signed in after restoring to a new device.

Frequently Asked Questions about restore-credentials

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Android Restore Credentials with Credential Manager?

Create a restore key with CreateRestoreCredentialRequest when the user signs in, retrieve it with GetRestoreCredentialOption during device setup, and delete it with clearCredentialState on sign-out. Use a two-tier architecture: BackupAgent.onRestoreFinished() for background restore and the launcher Activity as a foreground fallback.

What Android version supports Restore Credentials?

Restore Credentials works on devices running Android 9 (API level 28) and higher, with Google Play services core version 24220000 or higher, and version 1.5.0 or higher of the androidx.credentials library.

Does Restore Credentials require passkeys in my app?

No. Restore keys work independently of your authentication method, including passwords or Sign in with Google. The server-side implementation is the same as passkeys, but your client app can support restore keys without supporting passkeys.

Why does createCredential fail with E2eeUnavailableException?

This exception occurs when isCloudBackupEnabled is true but the device lacks backup or end-to-end encryption such as a screen lock. Catch the exception and retry createCredential with isCloudBackupEnabled set to false so the key is stored locally.

Should I implement a BackupAgent if allowBackup is false?

No. If allowBackup is false in AndroidManifest.xml, implement only the foreground restoration tier in the launcher Activity. Do not add a BackupAgent and do not change the allowBackup value.

Does this skill implement the server-side validation logic?

No. The skill covers only the Android client-side integration. After implementation it presents backend guidelines to the developer, covering restore key TTL, multi-device mapping, orphaned key cleanup, and session invalidation handling.