amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

[Feature request] Remember device does not allow specify name

Open akaunteban opened this issue 1 year ago • 1 comments

In my Authentication flow currently I am using the provided method by the library Amplify.Auth.rememberDevice() to skip the MFA challenge when requested for the user. It works great, however when I use the method Amplify.Auth.fetchDevices() to fetch all the remembered devices I get a lot of information, but I am not able to differentiate the different devices since the name variable of the object AuthDevice is null.

I have noticed that the used API in the method Amplify.Auth.rememberDevice() is ConfirmDevice and it allows you to send the name parameter to call the device as desired with a friendly name. However, the signature of the method Amplify.Auth.rememberDevice() does not allow to enter any parameter.

I know I can make a custom request to the cognito API ConfirmDevice and it would solve my problem.

But I think this is an essential feature that should be implemented by default in the library amplify-flutter and so avoid cumbersome code outside of the library.

I would like to file this feature request. If any further information is required please let me know. Thanks.

akaunteban avatar Feb 20 '24 20:02 akaunteban

@akaunteban thanks for opening the feature request. we will discuss it within team and provide update as we have them here.

NikaHsn avatar Feb 22 '24 00:02 NikaHsn

@akaunteban the mfa is not requested after the Amplify.Auth.rememberDevice()? After Amplify.Auth.rememberDevice is still being requested for some reason. How did you do that?

olya7viit avatar Mar 07 '24 09:03 olya7viit

The rememberDevice() function has been explicitly designed to skip MFA challenge when asked by the user. Check more info about it in the official docs: https://docs.amplify.aws/flutter/build-a-backend/auth/remember-device/

akaunteban avatar Mar 07 '24 10:03 akaunteban

@NikaHsn Do you know if there is something new about it?

akaunteban avatar Mar 20 '24 20:03 akaunteban