You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
definitiate_forgot_password(self):
""" Sends a verification code to the user to use to change their password. """params= {"ClientId": self.client_id, "Username": self.username}
self._add_secret_hash(params, "SecretHash")
returnself.client.forgot_password(**params) # Added return
Justification
Calling initiate_forgot_password when a user hasn't verified their signup information doesn't seem to send a password request. The type definitions for mypy_boto3 indicate that it could be useful to see the response information.
From mypy_boto3_congito_idp
defforgot_password(
self,
*,
ClientId: str,
Username: str,
SecretHash: str= ...,
UserContextData: UserContextDataTypeTypeDef= ...,
AnalyticsMetadata: AnalyticsMetadataTypeTypeDef= ...,
ClientMetadata: Mapping[str, str] = ...
) ->ForgotPasswordResponseTypeDef:
""" Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password. [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cognito-idp.html#CognitoIdentityProvider.Client.forgot_password) [Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_cognito_idp/client/#forgot_password) """
Objective
I want to verify that a method call did what was expected.
How to accomplish it
Returning the underlying boto3 response from a method call would achieve this.
For example the init.py/initiate_forgot_password method could be
Justification
Calling
initiate_forgot_password
when a user hasn't verified their signup information doesn't seem to send a password request. The type definitions for mypy_boto3 indicate that it could be useful to see the response information.From mypy_boto3_congito_idp
So this:
becomes:
which at least let's you see if the medium is near what was expected. In my case I noticed a user's email was wrong
The text was updated successfully, but these errors were encountered: