跳到正文
Skillpedia
安全10k · #11917

verified-email

它能做什么

这个技能指导使用 Credential Manager 在 Android 注册流程中添加已验证邮箱步骤。用户分享经过密码学验证的邮箱,而无需输入验证码。适合希望减少注册阻力的 Android 开发者。

适用场景

  • ✓当你希望新用户注册时无需输入一次性验证码的时候。
  • ✓当你需要在应用中向 Google 等可信服务商请求已验证的邮箱时。
  • ✓当你希望减少手动邮箱验证在注册过程中造成的流失的时候。

技能链接

https://github.com/android/skills/blob/main/identity/verified-email/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/android/skills/blob/main/identity/verified-email/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为我的 Android 应用添加已验证邮箱注册功能,让用户跳过邮箱验证码步骤。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能会在 Credential Manager API 中设置数字凭证请求,向可信服务商请求已验证的邮箱。然后应用从响应中获取该已验证邮箱。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Fundamentals

  • Overview of Digital Credentials: Learn about cryptographically verifiable documents and the role of Credential Manager.
  • Glossary : Definitions for dcql_query, UserInfoCredential, and GetDigitalCredentialOption.

Standards & Examples

Requirements

  • SDK Version: Minimum SDK 28 (Android 9) is required.
  • GMS Version: Google Play services version 25.49.x or higher.

Use Cases

Email verification is applicable for the following use cases:

  • Account Creation/Sign-up: Remove friction by skipping manual email verification.
  • Account Recovery: Securely verify email ownership during recovery flows.
  • Re-authentication: Versatile verification for high-risk actions, independent of the initial sign-in method.

Limitations & Nuances

  • Workspace Accounts: Google does not issue verifiable credentials for Google Workspace Accounts.
  • Freshness: For non-@gmail.com addresses, Google verifies the email at account creation but there is no freshness claim; implement an additional challenge like an OTP.

Scope & Pre-requisites

Crucial : This skill focuses exclusively on the Android client-side integration . It does not implement the app's server-side cryptographic validation logic. Server-side validation of the returned credential is required for security and must be implemented in your backend.

Codebase exploration for Use Cases

Get started with the following queries in project source code to find relevant screens with different use cases to implement verified email:

  • SignUpScreen
  • "Email address"
  • "Recover Account"
  • "Account Recovery"
  • "Forgot password?"
  • "Delete Account"

Identifying Integration Points

To implement this feature effectively, you must first locate the relevant flows in your codebase. To initiate, start with the following strategies to cater to different use cases using verified email:

1. Search for Navigation Routes

If your app uses Navigation, search for routes or destinations related to authentication:

Look for:

  • Keywords : signup, registration, create_account, forgot_password, recovery, verify_email.
  • Code Pattern : Search for NavHost or composable destinations using these strings.

2. Locate Authentication ViewModels

Find the business logic handling user attributes and account creation, account recovery:

  • Keywords : SignUpViewModel, AuthViewModel, RegistrationRepository.
  • Code Pattern : Look for methods like onCreateAccount, onRecoverAccount, or validateEmail.

3. Find instances of reauthentication for sensitive actions

For reauthentication use cases, find areas where users perform sensitive actions:

  • Keywords : ChangePassword, UpdatePayment, DeleteAccount, UpdateDetails, EditUserDetails

Important pointers for Implementation

  • Construct a Digital Credential Request and present it to the user.
  • Make sure to follow the request JSON structure as mentioned in documentation.
  • While presenting the request to the user, check if result credential is DigitalCredential and credential.credentialJson as responseJsonString
  • Parse the response from the client.
  • Offer a passkey creation option if one is not already present.
  • Assume a local SdJwtParser to parse raw SD-JWT and return a JSONObject.
  • Use a VerifiedUserInfo data class to store the parsed name and email.
  • Leave a TODO for developers to handle the app's server-side validation and parsing.
  • Direct users to the home screen after API call succe
常见问题

需要什么 Android 版本?

应用必须运行在 Android 9(API 28)或更高版本上,并且 Google Play 服务版本需为 25.49 或更高。

该请求使用什么标准?

它使用 OpenID4VP 标准来发起数字凭证请求。

有测试的方法吗?

有。该技能提供了一个数字凭证演示网站,用于跨平台测试。

详情

作者的原始描述

Provides a complete workflow for implementing verified email retrieval on Android Credential Manager API. Use this skill to integrate a secure, OTP-less email verification flow into an Android app. This skill solves the problem of high-friction sign-up processes by leveraging cryptographically verified credentials from trusted providers like Google.

repo: android/skills

热度

GitHub 星标
10k
排名
#11917
许可证
Apache-2.0
更新时间
2026/10/29

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能