chore: update gen2-migration guide#14728
Draft
dgandhi62 wants to merge 15 commits intogen2-migrationfrom
Draft
Conversation
1) userAttributes are supported. They can be seen amplify/auth/resource.ts
```typescript
import { defineAuth } from '@aws-amplify/backend';
import { testingapp1e98cb604e98cb604DefineAuthChallenge } from './testingapp1e98cb604e98cb604DefineAuthChallenge/resource';
import { testingapp1e98cb604e98cb604CreateAuthChallenge } from './testingapp1e98cb604e98cb604CreateAuthChallenge/resource';
import { testingapp1e98cb604e98cb604VerifyAuthChallengeResponse } from './testingapp1e98cb604e98cb604VerifyAuthChallengeResponse/resource';
import { testingapp1e98cb604e98cb604CustomMessage } from './testingapp1e98cb604e98cb604CustomMessage/resource';
import { testingapp1e98cb604e98cb604PreSignup } from './testingapp1e98cb604e98cb604PreSignup/resource';
import { testingapp1e98cb604e98cb604PreTokenGeneration } from './testingapp1e98cb604e98cb604PreTokenGeneration/resource';
export const auth = defineAuth({
loginWith: {
email: true,
},
userAttributes: {
profilePage: {
required: true,
mutable: true,
},
address: {
required: true,
mutable: true,
},
birthdate: {
required: true,
mutable: true,
},
gender: {
required: true,
mutable: true,
},
preferredUsername: {
required: true,
mutable: true,
},
lastUpdateTime: {
required: true,
mutable: true,
},
website: {
required: true,
mutable: true,
},
profilePicture: {
required: true,
mutable: true,
},
phoneNumber: {
required: true,
mutable: true,
},
timezone: {
required: true,
mutable: true,
},
locale: {
required: true,
mutable: true,
},
givenName: {
required: true,
mutable: true,
},
familyName: {
required: true,
mutable: true,
},
middleName: {
required: true,
mutable: true,
},
fullname: {
required: true,
mutable: true,
},
nickname: {
required: true,
mutable: true,
},
},
triggers: {
defineAuthChallenge: testingapp1e98cb604e98cb604DefineAuthChallenge,
createAuthChallenge: testingapp1e98cb604e98cb604CreateAuthChallenge,
verifyAuthChallengeResponse:
testingapp1e98cb604e98cb604VerifyAuthChallengeResponse,
customMessage: testingapp1e98cb604e98cb604CustomMessage,
preSignUp: testingapp1e98cb604e98cb604PreSignup,
preTokenGeneration: testingapp1e98cb604e98cb604PreTokenGeneration,
},
multifactor: {
mode: 'OFF',
},
});
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
amplify/auth/resource.tsIn Gen1, both capabilities are defined here. Denylist maps to
PreSignup: ['email-filter-denylist']and allowlist maps toPreSignup: ['email-filter-allowlist']. Both are just PreSignup Lambda triggers with different template scaffolding.The migration tool handles both identically through the generic trigger path. The mapping is made here. The migration tool has no awareness of whether the PreSignup trigger is an allowlist or denylist.
Sample output
While we don't know if further handling is needed for the other triggers,
denylistshould be supported.lambda triggers for dynamodb tables are supported as seen here
cognito lambda triggers should be supported as seen here