amplify-backend
amplify-backend copied to clipboard
support email mfa
Environment information
System:
OS: macOS 14.7
CPU: (10) arm64 Apple M1 Pro
Memory: 72.84 MB / 32.00 GB
Shell: /opt/homebrew/bin/fish
Binaries:
Node: 22.8.0 - ~/.local/state/fnm_multishells/43849_1730131892294/bin/node
Yarn: undefined - undefined
npm: 10.8.2 - ~/.local/state/fnm_multishells/43849_1730131892294/bin/npm
pnpm: 9.12.0 - ~/.local/state/fnm_multishells/43849_1730131892294/bin/pnpm
NPM Packages:
@aws-amplify/auth-construct: Not Found
@aws-amplify/backend: 1.5.1
@aws-amplify/backend-auth: Not Found
@aws-amplify/backend-cli: 1.3.0
@aws-amplify/backend-data: Not Found
@aws-amplify/backend-deployer: Not Found
@aws-amplify/backend-function: Not Found
@aws-amplify/backend-output-schemas: Not Found
@aws-amplify/backend-output-storage: Not Found
@aws-amplify/backend-secret: Not Found
@aws-amplify/backend-storage: Not Found
@aws-amplify/cli-core: Not Found
@aws-amplify/client-config: Not Found
@aws-amplify/deployed-backend-client: Not Found
@aws-amplify/form-generator: Not Found
@aws-amplify/model-generator: Not Found
@aws-amplify/platform-core: Not Found
@aws-amplify/plugin-types: Not Found
@aws-amplify/sandbox: Not Found
@aws-amplify/schema-generator: Not Found
aws-amplify: 6.6.7
aws-cdk: 2.164.1
aws-cdk-lib: 2.164.1
typescript: 5.6.3
AWS environment variables:
AWS_PROFILE = josef
AWS_REGION = us-east-1
AWS_STS_REGIONAL_ENDPOINTS = regional
AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables
Describe the feature
Amazon Cognito announced support for email-based multifactor with one-time passwords
// amplify/auth/resource.ts
import { defineAuth } from "@aws-amplify/backend"
export const auth = defineAuth({
loginWith: {
email: true,
},
multifactor: {
mode: "REQUIRED",
email: true,
// or
// email: {
// subject: "verify yourself",
// message: (code) => `here's your code: ${code}`
// }
},
})
Use case
n/a
Is there any documentation available for Amplify Gen1 customers?
We would like to enable Email OTP in our Amplify Gen1 App possibly by using an override until it's available?
Also will this feature be supported in Amplify Gen1 or just Gen2 planned?
+1
It would be really nice if amplify can support this so users can choose between SMS and email for receiving their MFA code. It would be nice if you can add deliveryType to the confirmSignIn input param so Amplify knows how to send the MFA code.
Hello, any update on this? Would be great if we could implement this in our app :)
Does this ticket cover supporting this in the amplify react ui or should that be a different ticket under amplify-ui project? Is there an existing ticket under amplify-ui to support this in react ui?
Multi-factor authentication (MFA) via email is now available through the defineAuth construct.
To enable this feature, please upgrade @aws-amplify/backend to version ^1.18.0 or higher.