Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: prepareGetCredential #34

Open
Tkko opened this issue Dec 20, 2024 · 0 comments
Open

feat: prepareGetCredential #34

Tkko opened this issue Dec 20, 2024 · 0 comments

Comments

@Tkko
Copy link
Owner

Tkko commented Dec 20, 2024

Feature Request: Add prepareGetCredential Method Support for Android Credential Manager

Objective:

Implement the prepareGetCredential method to reduce latency when showing the account selector in the getCredential process on Android 14 or higher.

Tasks:

  1. Review API Documentation:

    • Study the prepareGetCredential method in the Android Credential Manager API.
    • Understand how to create GetCredentialRequest with options like getPublicKeyCredentialOption and getPasswordOption.
  2. Native Android Implementation:

    • Implement the prepareGetCredential method to:
      • Accept GetCredentialRequest with relevant options.
      • Return a PrepareGetCredentialResponse object with cached data.
  3. Flutter Integration:

    • Add a Dart API for this method:
      Future<SmartAuthResult> prepareGetCredential(params);
    • Define a model for PrepareGetCredentialResponse to encapsulate cached data results.
  4. Combine with getCredential:

    • Ensure prepareGetCredential works seamlessly with the existing getCredential API.
    • Use cached data from the PrepareGetCredentialResponse to reduce latency in UI rendering.
  5. Error Handling:

    • Handle cases where:
      • prepareGetCredential is called on unsupported Android versions.
      • Invalid or unsupported options are passed.
  6. Documentation:

    • Update the documentation to explain:
      • The purpose of prepareGetCredential.
      • Usage examples and supported Android versions.
    • Highlight its benefits for reducing latency in credential selection.
  7. Sample App:

    • Add a demonstration in the sample app showing how prepareGetCredential enhances the getCredential flow.
      Let me know if this works or needs further refinement!
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant