Skip to content

Commit 3a8006c

Browse files
josefaidtrtpascualdindjarinjsatieriandbanksdesign
authored
sync next-release/main (#8246)
* add info that retaining resources is not supported in sandbox (#8100) * add info that retaining resources is not supported in sandbox * update wording to be specific to sandbox delete ignoring removal policies * chore: pin cross spawn to 7.0.6 (#8107) * fix: update custom tool example (#8109) * update conversation > tools page with more information / examples (#8113) * Add AI kit > generation > data-extraction example (#8108) * Adding AIConversation docs (#8116) * Adding AIConversation docs * fixing build error * Update src/pages/[platform]/ai/conversation/ai-conversation/index.mdx Co-authored-by: dindjarinjs <[email protected]> * Update src/pages/[platform]/ai/conversation/ai-conversation/index.mdx Co-authored-by: Ian Saultz <[email protected]> * Update src/pages/[platform]/ai/conversation/ai-conversation/index.mdx Co-authored-by: Ian Saultz <[email protected]> * Update src/pages/[platform]/ai/conversation/ai-conversation/index.mdx Co-authored-by: Ian Saultz <[email protected]> * Update src/pages/[platform]/ai/conversation/ai-conversation/index.mdx Co-authored-by: Ian Saultz <[email protected]> * Update src/pages/[platform]/ai/conversation/ai-conversation/index.mdx Co-authored-by: Ian Saultz <[email protected]> * Update src/pages/[platform]/ai/conversation/ai-conversation/index.mdx Co-authored-by: Ian Saultz <[email protected]> * updats * chore: bump ui-react lib --------- Co-authored-by: dindjarinjs <[email protected]> Co-authored-by: Ian Saultz <[email protected]> * Update docs to use Claude 3.5 Haiku (#8124) Co-authored-by: josef <[email protected]> * add conversations > connect your frontend page with client examples (#8119) * Add passwordless (#8127) * initial ia * concept boilerplate * add code snippet placeholders, cross links, warning for backend support * chore(auth): add swift passwordless sign up/auto sign in changes (#8128) * Apply suggestions from code review * rm comments, stale sections * chore: add new steps and new flow type * chore(auth): add swift passwordless sign in/web authn changes (#8131) * chore(auth): add swift passwordless sign in/web authn changes * removed unused section * remove flutter blocks * fix spelling * chore(auth): update swift passwordless autosignin Combine snippets (#8132) * chore(auth): add js passwordless changes (#8129) * chore(auth): add js passwordless changes * chore(auth): add filters and a react-native callout; code spacing * chore(auth): add sign in updates * Update src/pages/[platform]/build-a-backend/auth/manage-users/manage-webauthn-credentials/index.mdx Co-authored-by: James Jarvis <[email protected]> * chore(auth): add associate api to the manage webauthn page * Update src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx Co-authored-by: josef <[email protected]> * chore(auth): use string literals * chore(auth): add signin next step types * add js sign up examples * chore(auth): improve wording * chore(auth): add first factor selection to confirm sign-in next steps * Update src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx Co-authored-by: James Jarvis <[email protected]> * Update src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx Co-authored-by: James Jarvis <[email protected]> * chore(auth): review feedback - formatting and wording * chore(auth): move user auth flow info into switching flows page --------- Co-authored-by: James Jarvis <[email protected]> Co-authored-by: josef <[email protected]> * resolve structural issues * fix extra closing tag * filter passwordless blocks * Update src/pages/[platform]/build-a-backend/auth/concepts/passwordless/index.mdx * revert auth flow order change * update user auth flow description --------- Co-authored-by: Abhash Kumar Singh <[email protected]> Co-authored-by: Harsh <[email protected]> Co-authored-by: Parker Scanlon <[email protected]> Co-authored-by: James Jarvis <[email protected]> * fix: update Next.js pages link to latest ver (#8126) * docs(js): more passwordless sign in examples (#8135) * more sign in examples * Apply suggestions from code review Co-authored-by: josef <[email protected]> * fix typo --------- Co-authored-by: josef <[email protected]> * update nextjs AI generate sample (#8143) * Update passwordless docs with Android examples (#8139) * Add initial android sign in doc updates * Add sign in with preferred challenge * Finish adding the non-webauthn sign in docs * Add passwordless sign in docs into the multi-step-sign-in page * Update manage-webauthn-credentials/index.mdx for android * Add callingActivity to associateWebAuthnCredential examples * Bring android sign-in docs to parity * Add Android docs for switching authentication flows * Add USER_AUTH password to the sign in docs * Update sign up docs * Add Android's WebAuthn details to `connect-your-frontend/sign-in/index.mdx` * Fix some small issues and update multi-step sign in * Add first factor selection section for android after merge * Update src/pages/[platform]/build-a-backend/auth/connect-your-frontend/multi-step-sign-in/index.mdx Co-authored-by: josef <[email protected]> * Update src/pages/[platform]/build-a-backend/auth/connect-your-frontend/multi-step-sign-in/index.mdx Co-authored-by: josef <[email protected]> * Apply suggestions from code review Co-authored-by: josef <[email protected]> * Replace usages of username with email * Update src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx Co-authored-by: James Jarvis <[email protected]> * Update index.mdx --------- Co-authored-by: Matt Creaser <[email protected]> Co-authored-by: josef <[email protected]> Co-authored-by: James Jarvis <[email protected]> * docs(js): add durability options (#8133) * docs(js): add durability options * chore: add copy example for expected bucket owner * Q workspace command (#8147) * Q workspace command * Update src/pages/[platform]/build-a-backend/q-developer/index.mdx Co-authored-by: Arundeep Nagaraj <[email protected]> * Update src/pages/[platform]/build-a-backend/q-developer/index.mdx Co-authored-by: Arundeep Nagaraj <[email protected]> * Update src/pages/[platform]/build-a-backend/q-developer/index.mdx Co-authored-by: Arundeep Nagaraj <[email protected]> * Update src/pages/[platform]/build-a-backend/q-developer/index.mdx Co-authored-by: Arundeep Nagaraj <[email protected]> * closing tag * Update src/pages/[platform]/build-a-backend/q-developer/index.mdx Co-authored-by: James Jarvis <[email protected]> --------- Co-authored-by: Arundeep Nagaraj <[email protected]> Co-authored-by: James Jarvis <[email protected]> * ai kit: add table for supported models and add nova (#8148) * fix code snippet (#8146) * docs(js): expand passwordless examples for multistep sign in, autosign in, and switching flows (#8138) * add additional detail to switching auth flows page * expand autosignin examples * clarify language * fix wording * add passwordless steps to multistep sign in page * tweak language * Update src/pages/[platform]/build-a-backend/auth/connect-your-frontend/switching-authentication-flows/index.mdx Co-authored-by: Parker Scanlon <[email protected]> --------- Co-authored-by: Parker Scanlon <[email protected]> * adds resourceGroupName to function docs (#8140) * add resourceGroupName * feat: add instructions for adding event api to backend (#8155) * feat: add instructions for adding event api to backend * Apply suggestions from code review Co-authored-by: josef <[email protected]> --------- Co-authored-by: josef <[email protected]> * feat: Fix examples to use lambda data client (#8096) * feat: Fix examples to use lambda data client * fix: Schema import pattern * Update src/pages/[platform]/build-a-backend/data/customize-authz/grant-lambda-function-access-to-api/index.mdx Co-authored-by: josef <[email protected]> * Add warning after data client handler examples * Update src/pages/[platform]/build-a-backend/data/customize-authz/grant-lambda-function-access-to-api/index.mdx Co-authored-by: josef <[email protected]> * Update src/pages/[platform]/build-a-backend/data/customize-authz/grant-lambda-function-access-to-api/index.mdx Co-authored-by: josef <[email protected]> * Update src/pages/[platform]/build-a-backend/data/customize-authz/grant-lambda-function-access-to-api/index.mdx Co-authored-by: josef <[email protected]> * Apply suggestions from code review Co-authored-by: josef <[email protected]> --------- Co-authored-by: josef <[email protected]> * docs(js): fix predictions setup example (#8153) * fix predictions front end configuration example * update pkg installation * Fix typo in description of the use of amplify_outputs.json (Angular) (#8152) * fix: update Next.js docs links for serverComponentsPackages (#8156) * fix: update serverComponentExternalPackages references to latest Next.js docs links * update all property references to point to new name * Update index.mdx (#8159) * Added new badge and message for AI kit (#8110) Co-authored-by: dindjarinjs <[email protected]> * update module troubleshooting page with vue config (#8118) * add guide to extend api key expiration and rotate api key (#8158) * add guide to extend api key expiration and rotate key * add some addtional details * chore: update one of the numbered list (#8134) * docs(js): support uploadData checksumAlgorithm option (#8162) * add region callout for gen1 predictions directive (#8111) * adding autosignin callout (#8168) * Access groups example (#8174) * remove reference of renameModelFields * add example for accessing user groups from session * simplify example and add some spacing * revert change * add back ticks * chore: add troubleshooting for circular dependency errors in backend (#8171) * chore: add troubleshooting for circular dependency errors in backend * feat(data): add multi-endpoint instructions (#8186) * fix(storage): add options object to list example (#8184) * add options * fix spacing * spaces instead of tabs * [amplify-data] feat: add gen1 manyToMany auth discussion (#8172) * feat: add gen1 manyToMany auth discussion * Fix directive format Co-authored-by: Rene Brandel <[email protected]> --------- Co-authored-by: Rene Brandel <[email protected]> * feat(auth): Introduce resumable signin guide for the AmplifyJS (#7976) * Update Docs with contents of resumable sign in feature Co-authored-by: James Jarvis <[email protected]> * feature(function): add custom functions documentation for AWS Amplify-backend (#8176) * feature(function): add custom functions documentation for AWS Amplify Gen 2 @aws-amplify/amplify-backend/1602 * chore(function): rename function handler and update handler file path, remove go lambda alpha package * docs(functions): improve documentation for Python and Go functions, correcting capitalization and enhancing clarity * docs(functions): clarify function invocation instructions and improve code examples in custom functions documentation * chore: fix capitalization in documentation. * Update src/pages/[platform]/build-a-backend/functions/custom-functions/index.mdx Co-authored-by: josef <[email protected]> * Update src/pages/[platform]/build-a-backend/functions/custom-functions/index.mdx --------- Co-authored-by: josef <[email protected]> * update codeowners, remove docs team req (#8188) * add callout for branch env variables (#8177) * add callout for branch env variables * update callout location * chore: added cascade delete sections in Has One and Has Many data mod… (#8189) * chore: added cascade delete sections in Has One and Has Many data model relationships * moved title of section inside ts and js frameworks * nit fix * chore: update supported Next.js version range (#8191) * chore: remove/update callout regarding supported next version range (#8195) * update function scheduling (#8181) * update layer doc to add short version (#8161) * update layer doc to add short version * nits --------- Co-authored-by: Roshane Pascual <[email protected]> Co-authored-by: dindjarinjs <[email protected]> Co-authored-by: Ian Saultz <[email protected]> Co-authored-by: Danny Banks <[email protected]> Co-authored-by: Abhash Kumar Singh <[email protected]> Co-authored-by: Harsh <[email protected]> Co-authored-by: Parker Scanlon <[email protected]> Co-authored-by: James Jarvis <[email protected]> Co-authored-by: Tiffany Yeung <[email protected]> Co-authored-by: Kethan sai <[email protected]> Co-authored-by: Vincent Tran <[email protected]> Co-authored-by: Matt Creaser <[email protected]> Co-authored-by: AllanZhengYP <[email protected]> Co-authored-by: Mo Malaka <[email protected]> Co-authored-by: Arundeep Nagaraj <[email protected]> Co-authored-by: Nikhil Swaminathan <[email protected]> Co-authored-by: Ivan Artemiev <[email protected]> Co-authored-by: Aaron S. <[email protected]> Co-authored-by: andreyaurelien <[email protected]> Co-authored-by: Tiffany Yeung <[email protected]> Co-authored-by: Rene Brandel <[email protected]> Co-authored-by: Erik Hanchett <[email protected]> Co-authored-by: Dane Pilcher <[email protected]> Co-authored-by: bobbyu99 <[email protected]> Co-authored-by: chris <[email protected]> Co-authored-by: Amplifiyer <[email protected]> Co-authored-by: Tim Schmelter <[email protected]> Co-authored-by: Joon Choi <[email protected]> Co-authored-by: Burak Karahan <[email protected]> Co-authored-by: Tejas Khanolkar <[email protected]> Co-authored-by: Hui Zhao <[email protected]>
1 parent 563f3a9 commit 3a8006c

File tree

89 files changed

+6429
-695
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+6429
-695
lines changed

.github/CODEOWNERS

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
* @aws-amplify/documentation-team
2-
31
#Other
42
/src/pages/gen1/\[platform\]/build-a-backend/existing-resources/ @josefaidt @hdworld11 @dbanksdesign
53
/src/pages/gen1/\[platform\]/build-a-backend/functions/ @josefaidt
@@ -162,9 +160,9 @@
162160
/src/pages/gen1/\[platform\]/prev/build-a-backend/utilities/ @josefaidt
163161

164162
#Deploy and Host
165-
/src/pages/gen1/\[platform\]/deploy-and-host/ @mauerbac
166-
/src/pages/gen1/\[platform\]/prev/deploy-and-host/ @mauerbac
167-
/src/pages/\[platform\]/deploy-and-host/ @mauerbac
163+
/src/pages/gen1/\[platform\]/deploy-and-host/ @mauerbac @josefaidt
164+
/src/pages/gen1/\[platform\]/prev/deploy-and-host/ @mauerbac @josefaidt
165+
/src/pages/\[platform\]/deploy-and-host/ @mauerbac @josefaidt
168166

169167
#Docs Engineering
170168
/src/components @aws-amplify/documentation-team
@@ -186,4 +184,4 @@
186184
.github @aws-amplify/documentation-team
187185

188186
#Protected Content
189-
/src/protected @reesscot @srquinn21 @swaminator
187+
/src/protected @srquinn21 @swaminator

Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ We welcome contributions to the documentation site! Here's how to do it:
3737

3838
## Authoring pages
3939

40-
Our docs are generated using [Next.js](https://nextjs.org/). Refer to their docs on [how to create pages](https://nextjs.org/docs/basic-features/pages) as a primer.
40+
Our docs are generated using [Next.js](https://nextjs.org/). Refer to their docs on [how to create pages](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) as a primer.
4141

4242
The source for each page is in **src**. This folder is the only directory you need to touch to edit or create pages.
4343

cspell.json

+18-3
Original file line numberDiff line numberDiff line change
@@ -1614,14 +1614,29 @@
16141614
"ampx",
16151615
"autodetection",
16161616
"jamba",
1617-
"knowledgebases"
1617+
"webauthn",
1618+
"knowledgebases",
1619+
"rehype",
1620+
"assetlinks",
1621+
"AMPLIFYRULES",
1622+
"manylinux",
1623+
"GOARCH",
1624+
"norpc"
1625+
],
1626+
"flagWords": [
1627+
"hte",
1628+
"full-stack",
1629+
"Full-stack",
1630+
"Full-Stack",
1631+
"sudo"
16181632
],
1619-
"flagWords": ["hte", "full-stack", "Full-stack", "Full-Stack", "sudo"],
16201633
"patterns": [
16211634
{
16221635
"name": "youtube-embed-ids",
16231636
"pattern": "/embedId=\".*\" /"
16241637
}
16251638
],
1626-
"ignoreRegExpList": ["youtube-embed-ids"]
1639+
"ignoreRegExpList": [
1640+
"youtube-embed-ids"
1641+
]
16271642
}

mdx-components.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react';
22
import type { MDXComponents } from 'mdx/types';
33
import ExportedImage from 'next-image-export-optimizer';
4+
import { AIBanner } from './src/components/AIBanner';
45
import InlineFilter from './src/components/InlineFilter';
56
import { YoutubeEmbed } from './src/components/YoutubeEmbed';
67
import { Accordion } from './src/components/Accordion';
@@ -64,6 +65,7 @@ export function useMDXComponents(components: MDXComponents): MDXComponents {
6465
InlineFilter,
6566
MigrationAlert,
6667
YoutubeEmbed,
68+
AIBanner,
6769
Overview,
6870
ExternalLink,
6971
ExternalLinkButton,

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"private": true,
1111
"dependencies": {
1212
"@aws-amplify/amplify-cli-core": "^4.3.9",
13-
"@aws-amplify/ui-react": "^6.3.1",
13+
"@aws-amplify/ui-react": "^6.7.0",
14+
"@aws-amplify/ui-react-ai": "^1.0.0",
1415
"@docsearch/react": "3",
1516
"ajv": "^8.16.0",
1617
"aws-amplify": "^6.0.9",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
# AMPLIFYRULES
2+
3+
- RULES THAT SHOULD BE ADHERED TO THE LAST WORD.
4+
5+
1. EXTERNAL PROVIDERS THAT ARE AVAILABLE ARE LISTED BELOW IN THE EXAMPLE, DON'T CHANGE THE NAMING CONVENTION WHILE USING THOSE IN THE CODE GENERATION.
6+
2. DON'T FORGET TO IMPORT SECRET FOR ANY AUTHENTICATION BASED QUESTION.
7+
8+
```typescript
9+
import { defineAuth, secret } from "@aws-amplify/backend";
10+
```
11+
12+
3. CALLBACK AND LOGOUT URLS SHOULD BE INSIDE THE "EXTERNALPROVIDERS" OBJECT.
13+
4. WHILE ADDING THE CUSTOM ATTRIBUTES, IF THE ATTRIBUTE YOU ARE ADDING DOESNT BELONG TO THE STANDARD USER ATTRIBUTES LIST THEN ADD IT AS A CUSTOM ATTRIBUTE LIKE THIS "CUSTOM:ATTRIBUTE_NAME" AND THIS DOESN'T SUPPORT "REQUIRED" FIELD SO IGNORE IT WHILE GENERATING THE ANSWER.
14+
5. WHILE ADDING THE CUSTOM ATTRIBUTES, MAKE SURE TO ALWAYS ADD THE "DATATYPE" FIELD AS IT IS A REQUIRED FIELD.
15+
6. STATNDARD ATTIBUTES THAT ARE ALLOWED: `familyName`, `giveName`, `middleName`, `nickname`, `preferredUsername`, `profile`, `profilePicture`, `website`, `gender`, `birthdate`, `zoneinfo`, `locale`, `updatedAt`, `address`, `email`, `phoneNumber`, `sub`. THE `userAttributes` ARE SUPPOSED TO BE OUTSIDE THE `loginWith` OBJECT
16+
17+
7. THE FOLLOWING IS THE REQUIRED SYNTAX FOR `externalProviders`. ONLY THE FOUR LISTED PROVIDERS BELOW ARE SUPPORTED:
18+
19+
```typescript
20+
loginWith:{
21+
//loginMethods
22+
externalProviders: {
23+
google: {
24+
25+
},
26+
signInWithApple: {
27+
},
28+
loginWithAmazon: {
29+
30+
},
31+
facebook: {
32+
},
33+
callbackUrls: [
34+
// Callback URLs should be included inside the `externalProviders` object only, as per rule.
35+
36+
],
37+
logoutUrls: [
38+
// Logout URLs should also be included inside `externalProviders` as per rule.
39+
40+
],
41+
},
42+
}
43+
```
44+
45+
8. THE `userAttributes` ARE SUPPOSED TO BE OUTSIDE THE `loginWith` OBJECT
46+
`// Example configuration for user attributes and login methods
47+
loginWith: {
48+
// Specify login methods separately from user attributes, ONLY MENTION THE LOGINMETHODS THAT ARE SUPPOSED TO BE TRUE
49+
email: true, // Enable login with email
50+
phone: false, // Disable login with phone number
51+
},userAttributes: {
52+
email: true, // Attribute set as required
53+
phoneNumber: false, // Attribute not required
54+
givenName: true, // Attribute set as required
55+
},`
56+
9. THIS IS THE WAY TO SETUP THE MULTIFACTOR AUTHENTHICATION
57+
export const auth = defineAuth({
58+
loginWith: {
59+
email: true,
60+
phone: true,
61+
},
62+
multifactor: {
63+
mode: "OPTIONAL",
64+
sms: true,
65+
totp: false,
66+
},
67+
// IMPORTANT! THE LOGIC TO RESOLVE THIS VALUE CANNOT DETERMINE WHETHER EMAIL MFA IS ENABLED WHEN OVERRIDING THE RESOURCE.
68+
// BE SURE TO PICK A RECOVERY OPTION APPROPRIATE FOR YOUR APPLICATION.
69+
accountRecovery: "EMAIL_AND_PHONE_WITHOUT_MFA",
70+
senders: {
71+
email: {
72+
fromEmail: "[email protected]",
73+
},
74+
},
75+
})
76+
10. DON'T ADD THE `passwordPolicy` IN THE AUTH/RESOURCE.TS FILE.
77+
11. THE `username` SHOULD BE REPLACED WITH `userAttributes` WHEN REQUESTED TO SETUP USERNAME AS A LOGIN METHOD AS USERNAME IS NOT A VALID LOGIN METHOD ON DEFINEAUTH, FOR EXAMPLE:
78+
79+
```typescript
80+
userAttributes: {
81+
preferredUsername: {
82+
mutable: true,
83+
required: false
84+
}
85+
}
86+
```
87+
88+
12. `loginWith` SUPPORTS ONLY TWO METHODS THAT IS `email` and `phone`. THERE IS NO `username` attribute to that.
89+
13. THE `callbackUrls` AND `logoutUrls` SHOULD ONLY BE MENTIONED ONCE AS MENTIONED IN RULE #7 AND NOT FOR EACH EXTERNAL PROVIDER
90+
91+
```typescript
92+
import { defineAuth, secret } from "@aws-amplify/backend";
93+
94+
export const auth = defineAuth({
95+
// Login Methods Configuration
96+
loginWith: {
97+
// Only email and phone are supported as login methods
98+
email: true,
99+
phone: true,
100+
101+
// External Providers Configuration - all providers shown with required fields
102+
externalProviders: {
103+
// Google Authentication
104+
google: {
105+
clientId: secret("GOOGLE_CLIENT_ID"),
106+
clientSecret: secret("GOOGLE_CLIENT_SECRET"),
107+
},
108+
// Sign in with Apple
109+
signInWithApple: {
110+
clientId: secret("SIWA_CLIENT_ID"),
111+
keyId: secret("SIWA_KEY_ID"),
112+
privateKey: secret("SIWA_PRIVATE_KEY"),
113+
teamId: secret("SIWA_TEAM_ID"),
114+
},
115+
// Login with Amazon
116+
loginWithAmazon: {
117+
clientId: secret("LOGINWITHAMAZON_CLIENT_ID"),
118+
clientSecret: secret("LOGINWITHAMAZON_CLIENT_SECRET"),
119+
},
120+
// Facebook Authentication
121+
facebook: {
122+
clientId: secret("FACEBOOK_CLIENT_ID"),
123+
clientSecret: secret("FACEBOOK_CLIENT_SECRET"),
124+
},
125+
// Callback and logout URLs must be inside externalProviders
126+
callbackUrls: [
127+
"http://localhost:3000/profile",
128+
"https://mywebsite.com/profile",
129+
],
130+
logoutUrls: ["http://localhost:3000/", "https://mywebsite.com"],
131+
},
132+
},
133+
134+
// User Attributes Configuration - outside loginWith
135+
userAttributes: {
136+
// Standard attributes examples
137+
email: {
138+
mutable: true,
139+
required: true,
140+
},
141+
phoneNumber: {
142+
mutable: true,
143+
required: false,
144+
},
145+
givenName: {
146+
mutable: true,
147+
required: true,
148+
},
149+
familyName: {
150+
mutable: true,
151+
required: false,
152+
},
153+
birthdate: {
154+
mutable: true,
155+
required: false,
156+
},
157+
// Username configuration using preferredUsername
158+
preferredUsername: {
159+
mutable: true,
160+
required: false,
161+
},
162+
// Additional standard attributes
163+
address: {
164+
mutable: true,
165+
required: false,
166+
},
167+
gender: {
168+
mutable: true,
169+
required: false,
170+
},
171+
locale: {
172+
mutable: true,
173+
required: false,
174+
},
175+
profilePicture: {
176+
mutable: true,
177+
required: false,
178+
},
179+
website: {
180+
mutable: true,
181+
required: false,
182+
},
183+
// Custom attributes examples - note the 'custom:' prefix and required dataType
184+
"custom:organization": {
185+
dataType: "String",
186+
mutable: true,
187+
minLen: 3,
188+
maxLen: 100,
189+
},
190+
"custom:employeeId": {
191+
dataType: "Number",
192+
mutable: false,
193+
min: 1000,
194+
max: 9999999,
195+
},
196+
"custom:isVerified": {
197+
dataType: "Boolean",
198+
mutable: true,
199+
},
200+
},
201+
202+
// Multi-factor Authentication Configuration
203+
multifactor: {
204+
mode: "OPTIONAL", // Can be OPTIONAL or REQUIRED
205+
sms: true,
206+
totp: false,
207+
},
208+
209+
// Account Recovery Configuration
210+
accountRecovery: "EMAIL_AND_PHONE_WITHOUT_MFA",
211+
212+
// Email Sender Configuration
213+
senders: {
214+
email: {
215+
fromEmail: "[email protected]",
216+
},
217+
},
218+
});
219+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# AMPLIFYRULES
2+
3+
1. ALWAYS MENTION WHICH FILE PATH THE USER NEED TO PASTE THE CODE IN.
4+
2. MAKE SURE IF IT IS IN TWO DIFFERENT FILES, YOU DIVIDE THE CODE SNIPPET AND MENTION THE FILE PATH
5+
3. IF THE FILE DOESN'T ALREADY EXIST, GIVE THE STEPS TO GENERATE THE FILES.
6+
4. COMMENT ON EVERY PIECE OF CODE THAT CAN HELP IMPROVE CODE QUALITY THAT EXPLAINS WHAT THE LINE DOES

0 commit comments

Comments
 (0)