搜索插件、代码仓与 APP 分类

插件详情v5.1.0

credential_manager

凭据管理器插件。提供一键登录功能,并将凭据存储在 Android 设备的用户 Google 账户中以及 iOS 的钥匙串中。

AndroidiOS
近 30 天下载
4130
喜欢数
37
Pub 分数
160

安装插件

flutter pub add credential_manager

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

credential_manager 包通过设备的原生认证系统(Android 上的 Google 账户和 iOS 上的 Keychain)安全地存储和检索用户凭据,从而实现一键登录。它利用平台特定的安全存储来简化认证流程,减少登录时的摩擦。开发者可以集成无缝且安全的登录体验,而无需手动管理凭据存储。该插件专为需要快速、安全访问且用户输入最少的应用程序设计。

适合场景

  • 一键登录实现
  • 安全凭证存储
  • 跨平台身份验证
  • 简化用户入门
  • 无密码登录工作流

主要特点

  • 与 Google 帐号(Android)集成
  • 使用钥匙串(iOS)
  • 安全的凭据管理
  • 一键登录支持
  • 平台原生安全

适合对象

  • 需要快速登录的应用
  • 开发人员优先考虑安全
  • 跨平台身份验证解决方案
  • 用户友好的入门体验
  • 注重身份验证的应用程序

使用建议

  • 需要平台特定的设置
  • 仅限 Android 和 iOS
  • 依赖用户拥有 Google 帐号(Android)
  • 不适用于网页或桌面
  • 可能需要额外权限

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Credential Manager

Android iOS Web

Credential Manager is a Jetpack API that supports multiple sign-in methods, such as username and password, passkeys, and federated sign-in solutions (like Sign-in with Google) in a single API, simplifying integration for developers on Android. For iOS, it uses Keychain for storing credentials. On Web, it uses WebAuthn, the Credential Management API, and Google Identity Services (backed by FedCM).

For users, Credential Manager unifies the sign-in interface across authentication methods, making it clearer and easier to sign into apps, regardless of the chosen method.

For iOS, it uses Keychain and Autofill. On Web, see credential_manager_web for setup, including the required <script> tag in web/index.html.

For more information, please refer to the official documentation.

Getting Started

Add the dependency to your pubspec.yaml file:

credential_manager: <latest_version>

Or run:

flutter pub add credential_manager

Documentation

For comprehensive guides and detailed documentation, please visit our Documentation Page. Here you will find everything you need to get started, including API references, usage examples, and best practices for integrating Credential Manager into your application.

Credential Flow Previews

Android Credential Manager iOS Passkey Sheet
Credential Manager UI Apple Passkey UI

Heads-up: The screenshots above come directly from the official Android and Apple design resources. The bundled example application recreates similar flows but may look slightly different depending on your theme, device, or customizations.

Development Workflow

We rely on pre-commit to guarantee formatting and analyzer checks run before every commit.

pip3 install --user pre-commit   # first time only
python3 -m pre_commit install    # installs the git hook
# (optional) run on the entire repo once
python3 -m pre_commit run --all-files

The configured hooks will:

  • Format every staged Dart file using dart format.
  • Format docSite sources with Prettier.
  • Run flutter analyze across all packages (including the example app); commits are blocked if any analyzer error occurs.

Support the Project

If you find this library useful and would like to support its development, consider buying me a coffee:

☕ Buy Me a Coffee

Looking for Maintainers

We are looking for maintainers to help us keep this library up-to-date and implement new features. If you are interested in contributing, please reach out via GitHub or open an issue. Your help would be greatly appreciated!

Contributors

Thanks to all the contributors who have helped make this library better!

Contributors

所属分类

依赖

依赖清单 4 项

  • credential_manager_android^4.1.0
  • credential_manager_ios^4.0.0
  • credential_manager_platform_interface^4.0.0
  • credential_manager_web^2.3.0

源码仓库

使用此插件的项目

暂无相关数据。