mirror of
https://github.com/home-assistant/core.git
synced 2025-11-24 10:16:58 +00:00
Add HTTP endpoint for resending email confirmation (#11354)
This commit is contained in:
committed by
Pascal Vizeli
parent
2a2e6b6334
commit
cfd78f7b02
@@ -95,6 +95,21 @@ def confirm_register(cloud, confirmation_code, email):
|
||||
raise _map_aws_exception(err)
|
||||
|
||||
|
||||
def resend_email_confirm(cloud, email):
|
||||
"""Resend email confirmation."""
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
cognito = _cognito(cloud, username=email)
|
||||
|
||||
try:
|
||||
cognito.client.resend_confirmation_code(
|
||||
Username=email,
|
||||
ClientId=cognito.client_id
|
||||
)
|
||||
except ClientError as err:
|
||||
raise _map_aws_exception(err)
|
||||
|
||||
|
||||
def forgot_password(cloud, email):
|
||||
"""Initiate forgotten password flow."""
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
Reference in New Issue
Block a user