Hello everyone!
I want to change order of initialization of SecretHash property in CognitoUser ctor. If i pass valid username to CognitoUser ctor, it will be ignored because of order of assignment. My changes helps create SecretHash in ctor if valid username provided. It fixes issue, when i create CognitoUser with valid username and call StartWithRefreshTokenAuthAsync. It fails because UserId used instead of Username for SecretHash calculation.
Username changes only in two palces: CognitoUser ctor and UpdateUsernameAndSecretHash. ClientId and ClientSecret properties has private setters and can't be changed outside of class. So, i replace SecretHash recalculation to it direct usage.
Also, i replace raw string to usage of CognitoConstants & ChallengeNameType class properties.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Hello everyone! I want to change order of initialization of SecretHash property in CognitoUser ctor. If i pass valid username to CognitoUser ctor, it will be ignored because of order of assignment. My changes helps create SecretHash in ctor if valid username provided. It fixes issue, when i create CognitoUser with valid username and call StartWithRefreshTokenAuthAsync. It fails because UserId used instead of Username for SecretHash calculation.
Username changes only in two palces: CognitoUser ctor and UpdateUsernameAndSecretHash. ClientId and ClientSecret properties has private setters and can't be changed outside of class. So, i replace SecretHash recalculation to it direct usage.
Also, i replace raw string to usage of CognitoConstants & ChallengeNameType class properties.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.