Class AccountRecovery
How will a user be able to recover their account?
Inheritance
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.AWS.Cognito.dll
Syntax (csharp)
public sealed class AccountRecovery : Enum
Syntax (vb)
Public NotInheritable Class AccountRecovery
Inherits
Enum
Remarks
When a user forgets their password, they can have a code sent to their verified email or verified phone to recover their account. You can choose the preferred way to send codes below. We recommend not allowing phone to be used for both password resets and multi-factor authentication (MFA).
See: https://docs.aws.amazon.com/cognito/latest/developerguide/how-to-recover-a-user-account.html
ExampleMetadata: infused
Examples
new UserPool(this, "UserPool", new UserPoolProps {
// ...
AccountRecovery = AccountRecovery.EMAIL_ONLY
});
Synopsis
Fields
EMAIL_AND_PHONE_WITHOUT_MFA | Email if available, otherwise phone, but don’t allow a user to reset their password via phone if they are also using it for MFA. |
EMAIL_ONLY | Email only. |
NONE | None – users will have to contact an administrator to reset their passwords. |
PHONE_AND_EMAIL | (Not Recommended) Phone if available, otherwise email, and do allow a user to reset their password via phone if they are also using it for MFA. |
PHONE_ONLY_WITHOUT_MFA | Phone only, but don’t allow a user to reset their password via phone if they are also using it for MFA. |
PHONE_WITHOUT_MFA_AND_EMAIL | Phone if available, otherwise email, but don’t allow a user to reset their password via phone if they are also using it for MFA. |
value__ |
Fields
EMAIL_AND_PHONE_WITHOUT_MFA
Email if available, otherwise phone, but don’t allow a user to reset their password via phone if they are also using it for MFA.
public const AccountRecovery EMAIL_AND_PHONE_WITHOUT_MFA
Field Value
Type | Description |
---|---|
AccountRecovery |
EMAIL_ONLY
NONE
None – users will have to contact an administrator to reset their passwords.
public const AccountRecovery NONE
Field Value
Type | Description |
---|---|
AccountRecovery |
PHONE_AND_EMAIL
(Not Recommended) Phone if available, otherwise email, and do allow a user to reset their password via phone if they are also using it for MFA.
public const AccountRecovery PHONE_AND_EMAIL
Field Value
Type | Description |
---|---|
AccountRecovery |
PHONE_ONLY_WITHOUT_MFA
Phone only, but don’t allow a user to reset their password via phone if they are also using it for MFA.
public const AccountRecovery PHONE_ONLY_WITHOUT_MFA
Field Value
Type | Description |
---|---|
AccountRecovery |
PHONE_WITHOUT_MFA_AND_EMAIL
Phone if available, otherwise email, but don’t allow a user to reset their password via phone if they are also using it for MFA.
public const AccountRecovery PHONE_WITHOUT_MFA_AND_EMAIL
Field Value
Type | Description |
---|---|
AccountRecovery |
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |