Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Flutter Huawei FIDO: unable to decode FIDO registration response #348

Open
Talal0 opened this issue Jan 23, 2024 · 0 comments
Open

Flutter Huawei FIDO: unable to decode FIDO registration response #348

Talal0 opened this issue Jan 23, 2024 · 0 comments

Comments

@Talal0
Copy link

Talal0 commented Jan 23, 2024

Description

Fido2RegistrationResponse? response =
await fido2client.getRegistrationIntent(options);

I've integrated huawei_fido: ^6.3.0+305 in Flutter. I'm getting the FIDO2 registration object which contains "attestationObject", "clientDataJson" and "credentialId" all field types are Unit8List? but my server expects JSON format and I'm unable to decode the plugin's response into the desired JSON format .toJson() is not converting the response. Below attached the screenshot

Expected behavior

I want to get the attested registration object in this format
{ "id": "KEDetxZcUfinhVi6Za5nZQ", "type": "public-key", "rawId": "KEDetxZcUfinhVi6Za5nZQ", "response": { "clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoibmhrUVhmRTU5SmI5N1Z5eU5Ka3ZEaVh1Y01Fdmx0ZHV2Y3JEbUdyT0RIWSIsIm9yaWdpbiI6ImFuZHJvaWQ6YXBrLWtleS1oYXNoOk1MTHpEdll4UTRFS1R3QzZVNlpWVnJGUXRIOEdjVi0xZDQ0NEZLOUh2YUkiLCJhbmRyb2lkUGFja2FnZU5hbWUiOiJjb20uZ29vZ2xlLmNyZWRlbnRpYWxtYW5hZ2VyLnNhbXBsZSJ9", "attestationObject": "o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YViUj5r_fLFhV-qdmGEwiukwD5E_5ama9g0hzXgN8thcFGRdAAAAAAAAAAAAAAAAAAAAAAAAAAAAEChA3rcWXFH4p4VYumWuZ2WlAQIDJiABIVgg4RqZaJyaC24Pf4tT-8ONIZ5_Elddf3dNotGOx81jj3siWCAWXS6Lz70hvC2g8hwoLllOwlsbYatNkO2uYFO-eJID6A" } }

Current behavior

Screenshots
Screenshot 2024-01-23 at 5 34 09 PM

Environment

  • Platform: [Flutter]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant