From d13778e35c61f96c247c9ab4e131ae8a1ba8030f Mon Sep 17 00:00:00 2001 From: Kieren Eaton Date: Mon, 14 Feb 2022 23:38:48 +0800 Subject: [PATCH] Added resend_confirmation_code (#99) --- pycognito/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pycognito/__init__.py b/pycognito/__init__.py index 9b9e93a8..311f2c40 100644 --- a/pycognito/__init__.py +++ b/pycognito/__init__.py @@ -416,6 +416,19 @@ def confirm_sign_up(self, confirmation_code, username=None): self._add_secret_hash(params, "SecretHash") self.client.confirm_sign_up(**params) + def resend_confirmation_code(self, username): + """ + Trigger resending the confirmation code message. + :param username: User's username + :return: + """ + params = { + "ClientId": self.client_id, + "Username": username, + } + self._add_secret_hash(params, "SecretHash") + self.client.resend_confirmation_code(**params) + def admin_authenticate(self, password): """ Authenticate the user using admin super privileges