internal async Task <bool> VerifyAccessCode(string username, string code) { AmazonCognitoIdentityProviderClient provider = new AmazonCognitoIdentityProviderClient(new Amazon.Runtime.AnonymousAWSCredentials()); ConfirmSignUpRequest confirmSignUpRequest = new ConfirmSignUpRequest(); confirmSignUpRequest.Username = username; confirmSignUpRequest.ConfirmationCode = code; confirmSignUpRequest.ClientId = CLIENTAPP_ID; try { ConfirmSignUpResponse confirmSignUpResult = provider.ConfirmSignUp(confirmSignUpRequest); Console.WriteLine(confirmSignUpResult.ToString()); } catch (Exception ex) { Console.WriteLine(ex); return(false); } return(true); }
internal async Task <bool> VerifyAccessCode(string username, string code) { AmazonCognitoIdentityProviderClient provider = new AmazonCognitoIdentityProviderClient(new AnonymousAWSCredentials(), REGION); ConfirmSignUpRequest confirmSignUpRequest = new ConfirmSignUpRequest() { Username = username, ConfirmationCode = code, ClientId = CLIENT_ID }; ConfirmSignUpResponse result = provider.ConfirmSignUp(confirmSignUpRequest); if (result != null) { return(true); } else { return(false); } }