Skip to content

Commit 7bcac3e

Browse files
authored
gen2 fix callout about verification email style, use auth resource de… (aws-amplify#6736)
* gen2 fix callout about verification email style, use auth resource definition * immutable -> mutable
1 parent 2d7b2aa commit 7bcac3e

File tree

1 file changed

+2
-2
lines changed
  • src/pages/gen2/build-a-backend/auth/enable-sign-up

1 file changed

+2
-2
lines changed

src/pages/gen2/build-a-backend/auth/enable-sign-up/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const auth = defineAuth({
5353
+ userAttributes: {
5454
+ birthdate: {
5555
+ required: false,
56-
+ immutable: true,
56+
+ mutable: false,
5757
+ },
5858
+ },
5959
});
@@ -266,7 +266,7 @@ async function handleSignUpConfirmation({ username, confirmationCode }) {
266266
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:
267267

268268
- User confirmed their account with a verification code sent to their phone or email (default option).
269-
- 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.
269+
- 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`)
270270

271271
```ts
272272
import { autoSignIn } from 'aws-amplify/auth';

0 commit comments

Comments
 (0)