From a2c400a398047f651acb5526342e7222a22f53aa Mon Sep 17 00:00:00 2001 From: josefaidt Date: Thu, 4 Jan 2024 11:28:42 -0800 Subject: [PATCH 1/2] gen2 fix callout about verification email style, use auth resource definition --- src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx b/src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx index ff7c57481cc..6499cebf01d 100644 --- a/src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx +++ b/src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx @@ -266,7 +266,7 @@ async function handleSignUpConfirmation({ username, confirmationCode }) { The `autoSignIn` API will automatically sign-in a user when it was previously enabled by the `signUp` API and after any of the following cases has completed: - User confirmed their account with a verification code sent to their phone or email (default option). -- User confirmed their account with a verification link sent to their phone or email. In order to enable this option you need to go to the [Amazon Cognito console](https://aws.amazon.com/pm/cognito), look for your userpool, then go to the `Messaging` tab and enable `link` mode inside the `Verification message` option. Finally you need to define the `signUpVerificationMethod` to `link` inside the `Cognito` option of your `Auth` config. +- User confirmed their account with a verification link sent to their phone or email. In order to enable this option you need to set `loginWith.email.verificationEmailStyle` to `LINK` in your auth resource file (`amplify/auth/resource.ts`) ```ts import { autoSignIn } from 'aws-amplify/auth'; From 43d3f6d4551549490d088a7d886e850f4abaf8b6 Mon Sep 17 00:00:00 2001 From: josefaidt Date: Thu, 4 Jan 2024 14:18:27 -0800 Subject: [PATCH 2/2] immutable -> mutable --- src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx b/src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx index 6499cebf01d..2b6ee47f551 100644 --- a/src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx +++ b/src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx @@ -53,7 +53,7 @@ export const auth = defineAuth({ + userAttributes: { + birthdate: { + required: false, -+ immutable: true, ++ mutable: false, + }, + }, });