Closed dgofman closed 3 years ago
Thank you, I’ll review on Sunday-Monday
@dgofman thank you, changes are available as of version 0.1.25+3
@furaiev Thanks!
@malkovro There are two issues. One is mine I didn't realize amazon-cognito-identity-dart-2/lib/src/cognito_user_pool.dart hardcoded and using the same key. In the second one we are initializing storage in two contractors:
https://github.com/furaiev/amazon-cognito-identity-dart-2/blob/master/lib/src/cognito_user.dart#L53 https://github.com/furaiev/amazon-cognito-identity-dart-2/blob/master/lib/src/cognito_user.dart#L69
https://github.com/furaiev/amazon-cognito-identity-dart-2/blob/master/lib/src/cognito_user_pool.dart#L44 https://github.com/furaiev/amazon-cognito-identity-dart-2/blob/master/lib/src/cognito_user_pool.dart#L64
In case you forgot to pass the same storage argument in one of them your 'lastUserKey' value will be always NULL. For this reason, I did not catch this problem before. (I am using custom SharedPreferences class) Now I am also dealing with this problem.
https://github.com/furaiev/amazon-cognito-identity-dart-2/pull/140
Another fix on line 594. Defined a local variable srp_username, otherwise you overriding user value.