最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Unable to enable email MFA for user in AWS Cognito using AdminSetUserMFAPreferenceRequest - Stack Overflow

programmeradmin1浏览0评论

I am able to enable SMS-based MFA for a user in AWS Cognito using the AdminSetUserMFAPreferenceRequest, but I am having trouble enabling MFA via email. Here's how I am currently enabling SMS MFA:

AdminSetUserMFAPreferenceRequest mfaRequest = new AdminSetUserMFAPreferenceRequest()
    .withUserPoolId(userPoolId)
    .withUsername(username)
    .withSMSMfaSettings(
        new SMSMfaSettingsType().withEnabled(true)
        .withPreferredMfa(true)
    );

This works for SMS, but I'm unsure of the correct way to enable email-based MFA. Is there a similar method to enable email MFA, or do I need to take a different approach?

发布评论

评论列表(0)

  1. 暂无评论