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

UserHandle data is missing in Flutter FIDO Authentication result #356

Open
Talal0 opened this issue Feb 15, 2024 · 5 comments
Open

UserHandle data is missing in Flutter FIDO Authentication result #356

Talal0 opened this issue Feb 15, 2024 · 5 comments

Comments

@Talal0
Copy link

Talal0 commented Feb 15, 2024

Description
I'm implementing Huawei FIDO Flutter plugin in my Flutter application. I have successfully registered the user using Huawei FIDO. In the authentication process, Huawei SDK returns an attested response from the authenticator, which doesn't include UserHandle in the object. My server-side FIDO requires UserHandle to complete the authentication process. I tried all possible options provided by Huawei documentation, but I'm unable to get the desired result.

Expected behavior
FIDO Authenticator should return UserHandle in the Authentication response

Current behavior
Not getting UserHandle in Huawei FIDO Authentication response.

Screenshots
Issue

huawei_assertion_response

Plugin
https://pub.dev/packages/huawei_fido
huawei_fido 6.3.0+305

Environment

@Taverz
Copy link

Taverz commented Mar 18, 2024

@Talal0 Hi! ))

What parameters do you specifically need? For example, there is a request that returns some data after authentication, you can try it. There is no UserHandler in the documentation

// Then request for authentication
Fido2AuthenticationResponse? authResponse = await fido2Client.getAuthenticationIntent(requestOptions);

class Fido2RegistrationResponse {

AuthenticatorAttestationResponse? authenticatorAttestationResponse;

class AuthenticatorAttestationResponse {
Uint8List? attestationObject;
Uint8List? clientDataJson;
Uint8List? credentialId;
Fido2RegistrationResponse(

@Talal0
Copy link
Author

Talal0 commented Mar 18, 2024

@Taverz In Android(Google PlayStore) device I'm getting UserHandle in FIDO2 authenticator response that is required at my server side FIDO2 which we have handled it. Can you please share how to convert Huawei's object Uint8List data into JSON format?

@Taverz
Copy link

Taverz commented Mar 18, 2024

@Talal0

I'm not sure if there is JSON there.
But you can try:
Uint8List unitList;
final json = String.fromCharCodes(unitList);
final map =jsonDecode(json) ;

@Taverz
Copy link

Taverz commented Mar 18, 2024

@Talal0

Perhaps there is some other format:

final json = hex.encode(data);
final json = base64.encode(data);
final json = utf8.decode(data);

@Talal0
Copy link
Author

Talal0 commented Mar 18, 2024

@Taverz already tried it all not working

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

2 participants