furaiev / amazon-cognito-identity-dart-2

Unofficial Amazon Cognito Identity Provider Dart SDK, to easily add user sign-up and sign-in to your mobile and web apps with AWS.
MIT License
188 stars 114 forks source link

Enabling TOTP for MFA #240

Closed ady-tsc closed 1 year ago

ady-tsc commented 1 year ago

Hi @furaiev ,

I want to enable MFA by using TOTP. Currently, i'm using this enableMfa() function but it automatically enable SMS-MFA only for the MFA options.

Is there any workaround to anable MFA using TOTP?

thankyou!

furaiev commented 1 year ago

Hello @ady-tsc , I am not sure if it is available with the current implementation. Could you please check if it is available in the official JS version?

ady-tsc commented 1 year ago

Hi @furaiev , i already saw the official docs that you mentioned before and also looked at the AWS documentation regarding how to enable TOTP. There is no function that enabling the TOTP method in amazon-cognito-identity-dart lib.

Screenshot 2023-09-11 at 11 55 22

The "enableMfa()" function also marked as deprecated for unknown reason.

But i looked at the aws-amplify lib and i notice that the implementation was defined there(same like the official docs from AWS). I want to ask for an opinion (because i'm new to AWS :_) ),

  1. Do those two repos have the same purpose and functionality? (aws-amplify and amazon-cognito-identity-dart)
  2. Should i use two different lib in one app (amazon-cognito-identity-dart and aws-amplify) or should i migrate completely to aws-amplify if i want to use that TOTP method.

Thankyou!

furaiev commented 1 year ago

@ady-tsc I would recommend you to use official aws-amplify. I keep amazon-cognito-identity-dart alive just because aws-amplify doesn't have full set of features yet.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

furaiev commented 1 year ago

closed with https://github.com/furaiev/amazon-cognito-identity-dart-2/pull/244