jonsaw / amazon-cognito-identity-dart

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
204 stars 93 forks source link

How to handle New Password challenge? #34

Open pbaker5 opened 5 years ago

pbaker5 commented 5 years ago

Hi,

The Use Case 4 says that when Authenticating and a CognitoUserNewPasswordRequiredException is thrown, handle the new password challenge. Looking through cognito_user.dart I can't see a way of doing that. Am I missing something?

Thanks.

demsey2 commented 5 years ago

@pbaker5 did you find any solution for that, I have the same issue

pbaker5 commented 5 years ago

@pbaker5 did you find any solution for that, I have the same issue

Nope.

ncb000gt commented 5 years ago

I have a pr up for this flow. You can pull down my changes and try them out: https://github.com/jonsaw/amazon-cognito-identity-dart/pull/22

Note that I'm not sure @jonsaw has had a chance to review the changes yet. But, they worked for me in my very localized testing. Let me know if you run into any issues. :)

demsey2 commented 5 years ago

thanks for the info, I tried to reference your fork in my pubspec.yaml with the following:

amazon_cognito_identity_dart:
    git:
      url: https://github.com/ncb000gt/amazon-cognito-identity-dart.git
      ref: master

but this still gets the original package, do you know how to fix that or what is there a better way to handle that?

ncb000gt commented 5 years ago

@demsey2 Try the branch new_password_required_challenge.

tigrenok00 commented 5 years ago

Hi! Any news on this? We need it as well... Thanks!

ncb000gt commented 5 years ago

@tigrenok00 Hopefully you're able to use the branch I noted above - I can't promise commit parity with this project as I update it as needed, but it will get you the feature you're looking for.