Skip to content

feat: prepareGetCredential #34

@Tkko

Description

@Tkko

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions