Chuyển đến nội dung
Skillpedia
Bảo mật10k · #11917

verified-email

Skill này làm gì

Skill này hướng dẫn thêm bước xác minh email vào luồng đăng ký Android bằng Credential Manager. Người dùng chia sẻ một email đã được xác minh bằng mật mã thay vì nhập mã. Nó dành cho lập trình viên Android muốn đăng ký ít ma sát hơn.

Khi nào nên dùng

  • ✓Khi bạn muốn người dùng mới đăng ký mà không cần nhập mã dùng một lần.
  • ✓Khi bạn cần yêu cầu một email đã xác minh từ nhà cung cấp đáng tin cậy, chẳng hạn Google, trong ứng dụng.
  • ✓Khi bạn muốn giảm tỷ lệ người dùng bỏ dở đăng ký do bước xác minh email thủ công.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/android/skills/blob/main/identity/verified-email/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Thêm đăng ký bằng email đã xác minh vào ứng dụng Android của tôi để người dùng bỏ qua bước nhập mã email.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill thiết lập một yêu cầu thông tin xác thực số trong Credential Manager API, yêu cầu một email đã xác minh từ nhà cung cấp đáng tin cậy. Sau đó ứng dụng lấy email đã xác minh từ phản hồi.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Cần phiên bản Android nào?

Ứng dụng phải chạy trên Android 9 (API 28) trở lên, với Google Play services phiên bản 25.49 trở lên.

Yêu cầu dùng chuẩn nào?

Nó dùng chuẩn OpenID4VP cho các yêu cầu thông tin xác thực số.

Có cách nào để kiểm thử không?

Có. Skill chỉ tới một trang demo thông tin xác thực số để kiểm thử đa nền tảng.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
10k
Vị trí xếp hạng
#11917
Giấy phép
Apache-2.0
Cập nhật
29/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự