LogoLogo
Github
  • 👋Welcome to Android-Credential-Manager Docs
  • 🖐️Getting Started
    • 🔧Installation
    • 📃Digitial Asset Linking
  • ➕Creating Credentials
    • Overview
    • Saving Username and Passwords
    • Creating a Passkey
    • Error Handling
  • 🧑‍💻Login Users
    • Overview
    • UserName and Password
    • Passkeys
    • Google Sign In
    • Error Handling
    • Performance Improvements
Powered by GitBook

2025 GuhanSenSam

On this page
  1. Login Users

Overview

Display all the saved credentials an user has to allow them to login

PreviousError HandlingNextUserName and Password

Last updated 3 months ago

Android Credential Manager presents a bottom card to its users with the available authentication methods that you have configured. Each credential type available is divided into a provider. Configure these providers and pass them to the login method and the requested login providers will be presented to the user if they are applicable.

Example

The following is an example snippet for allowing an user to login using either their saved username/password or using their Google Account

import { CredentialManager } from "credential-manager/CredentialManager";
import {
  GoogleProvider,
  UsernamePasswordProvider,
} from "credential-manager/loginProviders/LoginProviders";

CredentialManager.login([
      new UsernamePasswordProvider({}),
      new GoogleProvider({
        requireVerifiedPhoneNumber: true,
        serverClientId:
          "236165471941-5j2k7v03af3evisqvo8153eme4vjnfvq.apps.googleusercontent.com",
      }),
    ]);

The available options for each provider is documented in the next sections

🧑‍💻
Credential Manager Login
Bottom card that appears for login with Credential Manager