@@ -569,7 +588,7 @@ In v6, `resendSignUp` now takes named parameters instead of positional parameter
**V6**
-
+
```
input: ResendSignUpCodeInput {
username: string;
@@ -579,6 +598,7 @@ In v6, `resendSignUp` now takes named parameters instead of positional parameter
}
```
+
@@ -651,7 +671,11 @@ A major difference is that a `CognitoUser` is no longer returned from `signIn`.
Also notice that `challengeName` and `challengeParam` (returned in v5 as additional properties on the `CognitoUser`) are replaced in the output object by the `nextStep`property. `nextStep` includes `signInStep` and possibly additional props depending on the step. See [the Confirmation Required example](/[platform]/build-a-backend/auth/auth-migration-guide/#example-2-confirmation-required) for a detailed example of the new `signIn` flow.
-The `signIn` API no longer accepts `validationData` in v6: in v5 `validationData` was not used because the underlying Cognito API does not accept `validationData`
+
+ The `signIn` API no longer accepts `validationData` in v6: in v5
+ `validationData` was not used because the underlying Cognito API does not
+ accept `validationData`
+
@@ -683,7 +707,7 @@ Also notice that `challengeName` and `challengeParam` (returned in v5 as additio
**V6**
-
+
```
input: SignInInput {
username: string;
@@ -701,6 +725,7 @@ Also notice that `challengeName` and `challengeParam` (returned in v5 as additio
}
```
+
@@ -727,7 +752,7 @@ Also notice that `challengeName` and `challengeParam` (returned in v5 as additio
**V6**
-
+
```
type SignInOutput = {
isSignedIn: boolean;
@@ -749,6 +774,7 @@ Also notice that `challengeName` and `challengeParam` (returned in v5 as additio
```
+
@@ -993,7 +1019,11 @@ In the past, we've supported the ability to pass in `username`, `password` as po
`Auth.federatedSignIn` has become `signInWithRedirect` in v6, but is otherwise similar. The `provider` property accepts specific strings instead of an enum and also includes an option to send in a custom provider if you would like to use a provider not in the default list. For this use case you would pass an object containing the prop `custom` to `provider` instead of one of the predefined strings.
-The usage of `federatedSignIn` with Identity Pools is deprecated. If you are using an Identity Pool for authentication, please follow [this guide](/[platform]/build-a-backend/auth/advanced-workflows/#identity-pool-federation).
+
+ The usage of `federatedSignIn` with Identity Pools is deprecated. If you are
+ using an Identity Pool for authentication, please follow [this
+ guide](/[platform]/build-a-backend/auth/advanced-workflows/#identity-pool-federation).
+
@@ -1041,7 +1071,7 @@ In the past, we've supported the ability to pass in `username`, `password` as po
**V6**
-
+
```
input?: SignInWithRedirectInput {
provider?:
@@ -1056,8 +1086,9 @@ In the past, we've supported the ability to pass in `username`, `password` as po
};
}
```
-
+
+
@@ -1085,6 +1116,7 @@ In the past, we've supported the ability to pass in `username`, `password` as po
No output in v6
+
@@ -1184,7 +1216,7 @@ In v6, `confirmSignIn` is now used not only for MFA confirmation, but also in pl
Another major difference is that `CognitoUser` is no longer required as an input parameter or returned from `confirmSignIn`. All Auth API’s now use the current signed in user information to perform operations, so sending and receiving `CognitoUser` through every API is no longer required.
-Also notice that `challengeName` and `challengeParam` (returned in v5 as additional properties on the `CognitoUser`) are replaced in the output object by the `nextStep` property. `nextStep` includes `signInStep` and possibly additional props depending on the step.
+Also notice that `challengeName` and `challengeParam` (returned in v5 as additional properties on the `CognitoUser`) are replaced in the output object by the `nextStep` property. `nextStep` includes `signInStep` and possibly additional props depending on the step.
@@ -1203,7 +1235,7 @@ Also notice that `challengeName` and `challengeParam` (returned in v5 as additio
**V6**
-
+
```
input: ConfirmSignInInput {
challengeResponse: string;
@@ -1217,6 +1249,7 @@ Also notice that `challengeName` and `challengeParam` (returned in v5 as additio
}
```
+
@@ -1243,7 +1276,7 @@ Also notice that `challengeName` and `challengeParam` (returned in v5 as additio
**V6**
-
+
```
ConfirmSignInOutput {
isSignedIn: boolean;
@@ -1264,6 +1297,7 @@ Also notice that `challengeName` and `challengeParam` (returned in v5 as additio
}
```
+
@@ -1324,6 +1358,7 @@ The output is no longer just a string representing the secret code, but an objec
No input in v6
+
@@ -1348,6 +1383,7 @@ The output is no longer just a string representing the secret code, but an objec
```
+
@@ -1394,7 +1430,7 @@ In v6, `Auth.verifyTotpToken` has become `verifyTOTPSetup`, and the input has ch
**V6**
-
+
```
input: VerifyTOTPSetupInput {
code: string;
@@ -1405,6 +1441,7 @@ In v6, `Auth.verifyTotpToken` has become `verifyTOTPSetup`, and the input has ch
```
+
@@ -1429,6 +1466,7 @@ In v6, `Auth.verifyTotpToken` has become `verifyTOTPSetup`, and the input has ch
No output in v6
+
@@ -1477,7 +1515,7 @@ This API has been deprecated: existing use cases can be migrated to the `confirm
**V6**
-
+
```
input: ConfirmSignInInput {
challengeResponse: string;
@@ -1490,8 +1528,9 @@ This API has been deprecated: existing use cases can be migrated to the `confirm
};
}
```
-
+
+
@@ -1518,7 +1557,7 @@ This API has been deprecated: existing use cases can be migrated to the `confirm
**V6**
-
+
```
ConfirmSignInOutput {
isSignedIn: boolean;
@@ -1538,8 +1577,9 @@ This API has been deprecated: existing use cases can be migrated to the `confirm
}
}
```
-
+
+
@@ -1597,7 +1637,7 @@ This API has been deprecated: existing use cases can be migrated to the `confirm
**V6**
-
+
```
input: ConfirmSignInInput {
challengeResponse: string;
@@ -1612,6 +1652,7 @@ This API has been deprecated: existing use cases can be migrated to the `confirm
```
+
@@ -1638,7 +1679,7 @@ This API has been deprecated: existing use cases can be migrated to the `confirm
**V6**
-
+
```
ConfirmSignInOutput {
isSignedIn: boolean;
@@ -1660,6 +1701,7 @@ This API has been deprecated: existing use cases can be migrated to the `confirm
```
+
@@ -1723,6 +1765,7 @@ In addition, Cognito only allows 1 option to be `preferred`. This can be achieve
No input in v6
+
@@ -1738,7 +1781,7 @@ In addition, Cognito only allows 1 option to be `preferred`. This can be achieve
**V6**
-
+
```
FetchMFAPreferenceOutput: {
enabled?: ('SMS' | 'TOTP')[];
@@ -1747,6 +1790,7 @@ In addition, Cognito only allows 1 option to be `preferred`. This can be achieve
```
+
@@ -1797,7 +1841,7 @@ In v6, `Auth.setPreferredMFA` has been replaced by `updateMFAPreference`, which
**V6**
-
+
```
input: UpdateMFAPreferenceInput {
sms?:
@@ -1813,6 +1857,7 @@ In v6, `Auth.setPreferredMFA` has been replaced by `updateMFAPreference`, which
}
```
+
@@ -1832,6 +1877,7 @@ In v6, `Auth.setPreferredMFA` has been replaced by `updateMFAPreference`, which
No output in v6
+
@@ -1878,6 +1924,7 @@ This API has been deprecated and results apply only to SMS MFA configurations: e
No input in v6
+
@@ -1896,7 +1943,7 @@ This API has been deprecated and results apply only to SMS MFA configurations: e
**V6**
-
+
```
FetchMFAPreferenceOutput: {
enabled?: ('SMS' | 'TOTP')[];
@@ -1905,6 +1952,7 @@ This API has been deprecated and results apply only to SMS MFA configurations: e
```
+
@@ -1955,14 +2003,15 @@ The `signOut` API has not changed from v5 to v6 other than that it is now a func
**V6**
-
+
```
input?: SignOutInput {
global: boolean;
}
```
-
+
+
@@ -2012,7 +2061,7 @@ The `Auth.changePassword` API has become `updatePassword` in v6. It now accepts
**V6**
-
+
```
input: UpdatePasswordInput {
oldPassword: string;
@@ -2020,6 +2069,7 @@ The `Auth.changePassword` API has become `updatePassword` in v6. It now accepts
}
```
+
@@ -2039,6 +2089,7 @@ The `Auth.changePassword` API has become `updatePassword` in v6. It now accepts
No output in v6
+
@@ -2098,7 +2149,7 @@ In v6, the `Auth.forgotPassword` API has become `resetPassword`. It uses named p
**V6**
-
+
```
input: ResetPasswordInput {
username: string;
@@ -2111,6 +2162,7 @@ In v6, the `Auth.forgotPassword` API has become `resetPassword`. It uses named p
```
+
@@ -2132,20 +2184,20 @@ In v6, the `Auth.forgotPassword` API has become `resetPassword`. It uses named p
**V6**
-
+
```
ResetPasswordOutput {
isPasswordReset: boolean;
nextStep: {
- resetPasswordStep:
+ resetPasswordStep:
| 'CONFIRM_RESET_PASSWORD_WITH_CODE'
| 'DONE';
- additionalInfo?: {
+ additionalInfo?: {
[key: string]: string;
};
codeDeliveryDetails: {
destination?: string;
- deliveryMedium?:
+ deliveryMedium?:
| 'EMAIL'
| 'SMS'
| 'PHONE'
@@ -2155,8 +2207,9 @@ In v6, the `Auth.forgotPassword` API has become `resetPassword`. It uses named p
};
}
```
-
+
+
@@ -2244,6 +2297,7 @@ In v6, the `Auth.forgotPassword` API has become `resetPassword`. It uses named p
```
+
@@ -2262,6 +2316,7 @@ In v6, the `Auth.forgotPassword` API has become `resetPassword`. It uses named p
No output in v6
+
@@ -2357,7 +2412,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
**V6**
-
+
```
// fetchAuthSession
options?: FetchAuthSessionOptions {
@@ -2366,6 +2421,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
```
+
@@ -2390,7 +2446,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
**V6**
-
+
```
// getCurrentUser
GetCurrentUserOutput: {
@@ -2398,7 +2454,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
userId: string;
signInDetails?: {
loginId?: string;
- authFlowType?:
+ authFlowType?:
| 'USER_SRP_AUTH'
| 'CUSTOM_WITH_SRP'
| 'CUSTOM_WITHOUT_SRP'
@@ -2424,6 +2480,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
```
+
@@ -2497,7 +2554,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
**V6**
-
+
```
// fetchAuthSession
options?: FetchAuthSessionOptions {
@@ -2506,6 +2563,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
```
+
@@ -2530,7 +2588,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
**V6**
-
+
```
// getCurrentUser
GetCurrentUserOutput: {
@@ -2538,7 +2596,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
userId: string;
signInDetails?: {
loginId?: string;
- authFlowType?:
+ authFlowType?:
| 'USER_SRP_AUTH'
| 'CUSTOM_WITH_SRP'
| 'CUSTOM_WITHOUT_SRP'
@@ -2564,6 +2622,7 @@ Also note that we no longer return `refreshToken` or `clockDrift` with the `Auth
```
+
@@ -2621,14 +2680,15 @@ Note that we no longer return `refreshToken` or `clockDrift` with the `AuthSessi
**V6**
-
+
```
options?: FetchAuthSessionOptions {
forceRefresh?: boolean;
}
```
-
+
+
@@ -2649,7 +2709,7 @@ Note that we no longer return `refreshToken` or `clockDrift` with the `AuthSessi
**V6**
-
+
```
AuthSession {
tokens?: {
@@ -2668,6 +2728,7 @@ Note that we no longer return `refreshToken` or `clockDrift` with the `AuthSessi
```
+
@@ -2727,7 +2788,7 @@ Note that we no longer return `refreshToken` or `clockDrift` with the `AuthSessi
**V6**
-
+
```
options?: FetchAuthSessionOptions {
forceRefresh?: boolean;
@@ -2735,6 +2796,7 @@ Note that we no longer return `refreshToken` or `clockDrift` with the `AuthSessi
```
+
@@ -2755,7 +2817,7 @@ Note that we no longer return `refreshToken` or `clockDrift` with the `AuthSessi
**V6**
-
+
```
AuthSession {
tokens?: {
@@ -2774,6 +2836,7 @@ Note that we no longer return `refreshToken` or `clockDrift` with the `AuthSessi
```
+
@@ -2837,6 +2900,7 @@ The output has also changed: instead of an array of objects containing `Name` an
No input in v6
+
@@ -2855,7 +2919,7 @@ The output has also changed: instead of an array of objects containing `Name` an
**V6**
-
+
```
FetchUserAttributesOutput {
[key: string]?: string;
@@ -2863,6 +2927,7 @@ The output has also changed: instead of an array of objects containing `Name` an
```
+
@@ -2916,7 +2981,7 @@ Note that this API no longer accepts a `CognitoUser` as input. All Auth API’s
**V6**
-
+
```
input: UpdateUserAttributesInput {
userAttributes: {
@@ -2930,6 +2995,7 @@ Note that this API no longer accepts a `CognitoUser` as input. All Auth API’s
}
```
+
@@ -2945,18 +3011,18 @@ Note that this API no longer accepts a `CognitoUser` as input. All Auth API’s
**V6**
-
+
```
UpdateUserAttributesOutput {
[authKey in UserAttributeKey]: {
isUpdated: boolean;
nextStep: {
- updateAttributeStep:
+ updateAttributeStep:
| 'CONFIRM_ATTRIBUTE_WITH_CODE'
| 'DONE';
codeDeliveryDetails?: {
destination?: string;
- deliveryMedium?:
+ deliveryMedium?:
| 'EMAIL'
| 'SMS'
| 'PHONE'
@@ -2968,6 +3034,7 @@ Note that this API no longer accepts a `CognitoUser` as input. All Auth API’s
}
```
+
@@ -3019,7 +3086,7 @@ Note that this API no longer accepts a `CognitoUser` as input. All Auth API’s
**V6**
-
+
```
input: DeleteUserAttributesInput {
userAttributeKeys: [UserAttributeKey, ...UserAttributeKey[]];
@@ -3027,6 +3094,7 @@ Note that this API no longer accepts a `CognitoUser` as input. All Auth API’s
```
+
@@ -3046,6 +3114,7 @@ Note that this API no longer accepts a `CognitoUser` as input. All Auth API’s
No output in v6
+
@@ -3095,7 +3164,7 @@ In v6, `Auth.verifyCurrentUserAttribute` becomes `sendUserAttributeVerificationC
**V6**
-
+
```
input: SendUserAttributeVerificationCodeInput {
userAttributeKey: 'email' | 'phone_number';
@@ -3106,8 +3175,9 @@ In v6, `Auth.verifyCurrentUserAttribute` becomes `sendUserAttributeVerificationC
};
}
```
-
+
+
@@ -3121,7 +3191,7 @@ In v6, `Auth.verifyCurrentUserAttribute` becomes `sendUserAttributeVerificationC
**V6**
-
+
```
SendUserAttributeVerificationCodeOutput {
destination?: string;
@@ -3134,6 +3204,7 @@ In v6, `Auth.verifyCurrentUserAttribute` becomes `sendUserAttributeVerificationC
}
```
+
@@ -3183,7 +3254,7 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
**V6**
-
+
```
input: ConfirmUserAttributeInput {
userAttributeKey: 'email' | 'phone_number';
@@ -3192,6 +3263,7 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
```
+
@@ -3211,6 +3283,7 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
No output in v6
+
@@ -3269,7 +3342,7 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
**V6**
-
+
```
input: SendUserAttributeVerificationCodeInput {
userAttributeKey: 'email' | 'phone_number';
@@ -3282,6 +3355,7 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
```
+
@@ -3295,7 +3369,7 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
**V6**
-
+
```
SendUserAttributeVerificationCodeOutput {
destination?: string;
@@ -3307,8 +3381,9 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
attributeName?: 'email' | 'phone_number';
}
```
-
+
+
@@ -3369,7 +3444,7 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
**V6**
-
+
```
input: ConfirmUserAttributeInput {
userAttributeKey: 'email' | 'phone_number';
@@ -3378,6 +3453,7 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
```
+
@@ -3397,6 +3473,7 @@ In v6, `Auth.verifyCurrentUserAttributeSubmit` becomes `confirmUserAttribute`. T
No output in v6
+
@@ -3457,6 +3534,7 @@ The `rememberDevice` API has not changed significantly from v5 to v6 other than
No output in v6
+
@@ -3497,7 +3575,7 @@ The `forgetDevice` API has not changed significantly from v5 to v6 other than th
**V6**
-
+
```
input?: ForgetDeviceInput {
device?: {
@@ -3507,6 +3585,7 @@ The `forgetDevice` API has not changed significantly from v5 to v6 other than th
```
+
@@ -3535,7 +3614,7 @@ The `forgetDevice` API has not changed significantly from v5 to v6 other than th
## Auth.currentCredentials (DEPRECATED)
-This API has been deprecated: existing use cases can be migrated to the `fetchAuthSession` API. Note that `fetchAuthSession` will throw an error if there is no authenticated user. See the migration notes on [Auth.currentSession](/[platform]/build-a-backend/auth/auth-migration-guide/#authcurrentsession) for more details on how credentials differ between v5 and v6.
+This API has been deprecated: existing use cases can be migrated to the `fetchAuthSession` API. Note that `fetchAuthSession` will throw an error if there is no authenticated user. See the migration notes on [Auth.currentSession](/[platform]/build-a-backend/auth/auth-migration-guide/#authcurrentsession) for more details on how credentials differ between v5 and v6.
@@ -3547,7 +3626,7 @@ This API has been deprecated: existing use cases can be migrated to the `fetchAu
**V6**
-
+
```
options?: FetchAuthSessionOptions {
forceRefresh?: boolean;
@@ -3555,6 +3634,7 @@ This API has been deprecated: existing use cases can be migrated to the `fetchAu
```
+
@@ -3577,7 +3657,7 @@ This API has been deprecated: existing use cases can be migrated to the `fetchAu
**V6**
-
+
```
AuthSession {
tokens?: {
@@ -3596,6 +3676,7 @@ This API has been deprecated: existing use cases can be migrated to the `fetchAu
```
+
@@ -3663,14 +3744,15 @@ This API has been deprecated: existing use cases can be migrated to the `fetchAu
**V6**
-
+
```
options?: FetchAuthSessionOptions {
forceRefresh?: boolean;
}
```
-
+
+
@@ -3693,7 +3775,7 @@ This API has been deprecated: existing use cases can be migrated to the `fetchAu
**V6**
-
+
```
AuthSession {
tokens?: {
@@ -3711,6 +3793,7 @@ This API has been deprecated: existing use cases can be migrated to the `fetchAu
}
```
+
@@ -3809,6 +3892,7 @@ This API has been deprecated: existing use cases can be migrated by using a comb
```
+
@@ -3873,6 +3957,7 @@ This API has been deprecated: existing use cases can be migrated to the `fetchUs
No input in v6
+
@@ -3905,6 +3990,7 @@ This API has been deprecated: existing use cases can be migrated to the `fetchUs
```
+
@@ -3961,7 +4047,7 @@ Note that this API does not accept a `CognitoUser` as input. All Auth API’s no
**V6**
-
+
```
input: UpdateMFAPreferenceInput {
sms?:
@@ -3978,6 +4064,7 @@ Note that this API does not accept a `CognitoUser` as input. All Auth API’s no
```
+
@@ -3997,6 +4084,7 @@ Note that this API does not accept a `CognitoUser` as input. All Auth API’s no
No output in v6
+
@@ -4041,7 +4129,7 @@ Note that this API does not accept a `CognitoUser` as input. All Auth API’s no
**V6**
-
+
```
input: UpdateMFAPreferenceInput {
sms?:
@@ -4058,6 +4146,7 @@ Note that this API does not accept a `CognitoUser` as input. All Auth API’s no
```
+
@@ -4077,6 +4166,7 @@ Note that this API does not accept a `CognitoUser` as input. All Auth API’s no
No output in v6
+
diff --git a/src/pages/[platform]/build-a-backend/auth/data-usage-policy/index.mdx b/src/pages/[platform]/build-a-backend/auth/data-usage-policy/index.mdx
index 137027ab21c..04d546464d4 100644
--- a/src/pages/[platform]/build-a-backend/auth/data-usage-policy/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/data-usage-policy/index.mdx
@@ -2,19 +2,12 @@ import { getCustomStaticPath } from '@/utils/getCustomStaticPath';
export const meta = {
title: 'Data usage policy information',
- description: "Review the data types gathered by the Amplify library that Apple requires you to disclose in your app's data usage policy when submitting the app to the App Store.",
- platforms: [
- 'swift'
- ],
+ description:
+ "Review the data types gathered by the Amplify library that Apple requires you to disclose in your app's data usage policy when submitting the app to the App Store.",
+ platforms: ['swift'],
canonicalObjects: [
{
- platforms: [
- 'swift',
- 'swift',
- 'swift',
- 'swift',
- 'swift'
- ],
+ platforms: ['swift', 'swift', 'swift', 'swift', 'swift'],
canonicalPath: '/swift/build-a-backend/auth/data-usage-policy/'
}
]
@@ -24,7 +17,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/delete-user-account/index.mdx b/src/pages/[platform]/build-a-backend/auth/delete-user-account/index.mdx
index 9b635067a04..8a10c40b8f8 100644
--- a/src/pages/[platform]/build-a-backend/auth/delete-user-account/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/delete-user-account/index.mdx
@@ -33,7 +33,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/enable-guest-access/index.mdx b/src/pages/[platform]/build-a-backend/auth/enable-guest-access/index.mdx
index 65546120165..1bd1770013f 100644
--- a/src/pages/[platform]/build-a-backend/auth/enable-guest-access/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/enable-guest-access/index.mdx
@@ -10,7 +10,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/enable-sign-in/index.mdx b/src/pages/[platform]/build-a-backend/auth/enable-sign-in/index.mdx
index 43ddd85acd5..341bf77015f 100644
--- a/src/pages/[platform]/build-a-backend/auth/enable-sign-in/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/enable-sign-in/index.mdx
@@ -11,7 +11,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/enable-sign-up/index.mdx b/src/pages/[platform]/build-a-backend/auth/enable-sign-up/index.mdx
index 2f01faeef63..35cf028119f 100644
--- a/src/pages/[platform]/build-a-backend/auth/enable-sign-up/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/enable-sign-up/index.mdx
@@ -2,7 +2,8 @@ import { getCustomStaticPath } from '@/utils/getCustomStaticPath';
export const meta = {
title: 'Enable sign-up, sign-in, and sign-out',
- description: "Learn how to use Amplify's sign-up, sign-in, and sign-out APIs.",
+ description:
+ "Learn how to use Amplify's sign-up, sign-in, and sign-out APIs.",
platforms: [
'javascript',
'react-native',
@@ -13,13 +14,7 @@ export const meta = {
],
canonicalObjects: [
{
- platforms: [
- 'nextjs',
- 'angular',
- 'javascript',
- 'vue',
- 'react'
- ],
+ platforms: ['nextjs', 'angular', 'javascript', 'vue', 'react'],
canonicalPath: '/javascript/build-a-backend/auth/enable-sign-up/'
}
]
@@ -29,7 +24,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/existing-resources/index.mdx b/src/pages/[platform]/build-a-backend/auth/existing-resources/index.mdx
index c178748008e..62ae89a31a2 100644
--- a/src/pages/[platform]/build-a-backend/auth/existing-resources/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/existing-resources/index.mdx
@@ -11,7 +11,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/import-existing-resources/index.mdx b/src/pages/[platform]/build-a-backend/auth/import-existing-resources/index.mdx
index fd56bfdc3fd..9b83b7504a8 100644
--- a/src/pages/[platform]/build-a-backend/auth/import-existing-resources/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/import-existing-resources/index.mdx
@@ -1,8 +1,9 @@
import { getCustomStaticPath } from '@/utils/getCustomStaticPath';
-
+
export const meta = {
title: 'Use an existing Cognito User Pool and Identity Pool',
- description: 'Configure the Amplify CLI to use existing Amazon Cognito User Pool and Identity Pool resources as an authentication and authorization mechanism for other Amplify categories (API, Storage, and more).',
+ description:
+ 'Configure the Amplify CLI to use existing Amazon Cognito User Pool and Identity Pool resources as an authentication and authorization mechanism for other Amplify categories (API, Storage, and more).',
platforms: [
'android',
'angular',
@@ -27,7 +28,8 @@ export const meta = {
'angular',
'react-native'
],
- canonicalPath: '/javascript/build-a-backend/auth/import-existing-resources/'
+ canonicalPath:
+ '/javascript/build-a-backend/auth/import-existing-resources/'
}
]
};
@@ -36,7 +38,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
@@ -44,7 +46,6 @@ export function getStaticProps(context) {
}
};
}
-
Import existing Amazon Cognito resources into your Amplify project. Get started by running `amplify import auth` command to search for & import an existing Cognito User Pool & Identity Pool in your account.
@@ -72,19 +73,19 @@ This feature is particularly useful if you're trying to:
Select the "Cognito User Pool only" option when you've run `amplify import auth`. In order to successfully import your User Pool, your User Pools require at least one app client with the following conditions:
-- *A "Web app client"*: an app client **without** a client secret
+- _A "Web app client"_: an app client **without** a client secret
Run `amplify push` to complete the import procedure.
-import attributesCallout from "/src/fragments/common/writable-vs-mutable-attributes.mdx";
+import attributesCallout from '/src/fragments/common/writable-vs-mutable-attributes.mdx';
-
+
-Ensure that the hosted UI for an app client has a sign-out URL defined as omitting this may cause the Amplify CLI to not generate the OAuth `scopes`, `redirectSignIn`, `redirectSignOut` and `responseType` in the `aws-exports.js` file.
+Ensure that the hosted UI for an app client has a sign-out URL defined as omitting this may cause the Amplify CLI to not generate the OAuth `scopes`, `redirectSignIn`, `redirectSignOut` and `responseType` in the `aws-exports.js` file.
-If the Cognito user pool has native and web client defined ensure the clients have matching OAuth properties.
+If the Cognito user pool has native and web client defined ensure the clients have matching OAuth properties.
@@ -119,9 +120,9 @@ Run `amplify push` to complete the unlink procedure.
In order to successfully build your application with Amplify Console add the following environmental variables to your build environment:
-|Environment Variable|Description|
-|-|-|
-|AMPLIFY_USERPOOL_ID|The ID for the Amazon Cognito user pool imported for auth|
-|AMPLIFY_WEBCLIENT_ID|The ID for the app client to be used by web applications. The app client must be configured with access to the Amazon Cognito user pool specified by the AMPLIFY_USERPOOL_ID environment variable.|
-|AMPLIFY_NATIVECLIENT_ID|The ID for the app client to be used by native applications. The app client must be configured with access to the Amazon Cognito user pool specified by the AMPLIFY_USERPOOL_ID environment variable.|
-|AMPLIFY_IDENTITYPOOL_ID|The ID for the Amazon Cognito identity pool|
+| Environment Variable | Description |
+| --- | --- |
+| AMPLIFY_USERPOOL_ID | The ID for the Amazon Cognito user pool imported for auth |
+| AMPLIFY_WEBCLIENT_ID | The ID for the app client to be used by web applications. The app client must be configured with access to the Amazon Cognito user pool specified by the AMPLIFY_USERPOOL_ID environment variable. |
+| AMPLIFY_NATIVECLIENT_ID | The ID for the app client to be used by native applications. The app client must be configured with access to the Amazon Cognito user pool specified by the AMPLIFY_USERPOOL_ID environment variable. |
+| AMPLIFY_IDENTITYPOOL_ID | The ID for the Amazon Cognito identity pool |
diff --git a/src/pages/[platform]/build-a-backend/auth/index.mdx b/src/pages/[platform]/build-a-backend/auth/index.mdx
index 626c726429f..527b2595540 100644
--- a/src/pages/[platform]/build-a-backend/auth/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/index.mdx
@@ -3,7 +3,8 @@ import { getChildPageNodes } from '@/utils/getChildPageNodes';
export const meta = {
title: 'Authentication',
- description: 'Enable sign-in, sign-up and sign-out within minutes with pre-built UI components and powerful authentication APIs',
+ description:
+ 'Enable sign-in, sign-up and sign-out within minutes with pre-built UI components and powerful authentication APIs',
platforms: [
'android',
'angular',
@@ -35,7 +36,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
const childPageNodes = getChildPageNodes(meta.route);
return {
props: {
diff --git a/src/pages/[platform]/build-a-backend/auth/manage-mfa/index.mdx b/src/pages/[platform]/build-a-backend/auth/manage-mfa/index.mdx
index 9ef25edd7c3..9c67ecfba96 100644
--- a/src/pages/[platform]/build-a-backend/auth/manage-mfa/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/manage-mfa/index.mdx
@@ -16,13 +16,7 @@ export const meta = {
],
canonicalObjects: [
{
- platforms: [
- 'angular',
- 'nextjs',
- 'vue',
- 'javascript',
- 'react'
- ],
+ platforms: ['angular', 'nextjs', 'vue', 'javascript', 'react'],
canonicalPath: '/javascript/build-a-backend/auth/manage-mfa/'
}
]
@@ -32,7 +26,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/manage-passwords/index.mdx b/src/pages/[platform]/build-a-backend/auth/manage-passwords/index.mdx
index 940784310a0..7ada1da81bd 100644
--- a/src/pages/[platform]/build-a-backend/auth/manage-passwords/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/manage-passwords/index.mdx
@@ -33,7 +33,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/manage-user-profile/index.mdx b/src/pages/[platform]/build-a-backend/auth/manage-user-profile/index.mdx
index e89b7f73cd1..cae38a810e1 100644
--- a/src/pages/[platform]/build-a-backend/auth/manage-user-profile/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/manage-user-profile/index.mdx
@@ -2,7 +2,8 @@ import { getCustomStaticPath } from '@/utils/getCustomStaticPath';
export const meta = {
title: 'Manage user profiles',
- description: 'Learn more about how to enable customers to personalize their profile and verify their contact information with attributes.',
+ description:
+ 'Learn more about how to enable customers to personalize their profile and verify their contact information with attributes.',
platforms: [
'javascript',
'react-native',
@@ -30,7 +31,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/manage-user-session/index.mdx b/src/pages/[platform]/build-a-backend/auth/manage-user-session/index.mdx
index e4e415cfe09..b73a3064619 100644
--- a/src/pages/[platform]/build-a-backend/auth/manage-user-session/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/manage-user-session/index.mdx
@@ -30,7 +30,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
@@ -152,7 +152,7 @@ async function currentSession() {
### Refreshing sessions
-The `fetchAuthSession` API automatically refreshes the user's session when the authentication tokens have expired and a valid `refreshToken` is present. Additionally, you can also refresh the session explicitly by calling the `fetchAuthSession` API with the `forceRefresh` flag enabled.
+The `fetchAuthSession` API automatically refreshes the user's session when the authentication tokens have expired and a valid `refreshToken` is present. Additionally, you can also refresh the session explicitly by calling the `fetchAuthSession` API with the `forceRefresh` flag enabled.
```ts
import { fetchAuthSession } from 'aws-amplify/auth';
diff --git a/src/pages/[platform]/build-a-backend/auth/managing-attributes/index.mdx b/src/pages/[platform]/build-a-backend/auth/managing-attributes/index.mdx
index a8fe3f1cc81..cd7fd376944 100644
--- a/src/pages/[platform]/build-a-backend/auth/managing-attributes/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/managing-attributes/index.mdx
@@ -10,7 +10,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/managing-credentials/index.mdx b/src/pages/[platform]/build-a-backend/auth/managing-credentials/index.mdx
index 3b8e8b85c76..380e545b583 100644
--- a/src/pages/[platform]/build-a-backend/auth/managing-credentials/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/managing-credentials/index.mdx
@@ -1,5 +1,5 @@
import { getCustomStaticPath } from '@/utils/getCustomStaticPath';
-
+
export const meta = {
title: 'Manage credentials',
description: 'Learn how to customize credential storage.',
@@ -10,7 +10,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
@@ -18,8 +18,6 @@ export function getStaticProps(context) {
}
};
}
-
-
import flutter0 from '/src/fragments/lib/auth/flutter/managing_credentials/10_managing_credentials.mdx';
diff --git a/src/pages/[platform]/build-a-backend/auth/multi-step-sign-in/index.mdx b/src/pages/[platform]/build-a-backend/auth/multi-step-sign-in/index.mdx
index 83bd751b65c..3f6725b1f6a 100644
--- a/src/pages/[platform]/build-a-backend/auth/multi-step-sign-in/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/multi-step-sign-in/index.mdx
@@ -11,7 +11,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/override-cognito/index.mdx b/src/pages/[platform]/build-a-backend/auth/override-cognito/index.mdx
index 346a21de42c..7da596c92d0 100644
--- a/src/pages/[platform]/build-a-backend/auth/override-cognito/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/override-cognito/index.mdx
@@ -1,8 +1,9 @@
import { getCustomStaticPath } from '@/utils/getCustomStaticPath';
-
+
export const meta = {
title: 'Override Amplify-generated Cognito resources',
- description: "The 'amplify override auth' command generates a developer-configurable 'overrides' TypeScript file that provides Amplify-generated Cognito resources as CDK constructs. For example, developers can set auth settings that are not directly available in the Amplify CLI workflow, such as the number of valid days for a temporary password.",
+ description:
+ "The 'amplify override auth' command generates a developer-configurable 'overrides' TypeScript file that provides Amplify-generated Cognito resources as CDK constructs. For example, developers can set auth settings that are not directly available in the Amplify CLI workflow, such as the number of valid days for a temporary password.",
platforms: [
'android',
'angular',
@@ -36,7 +37,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
@@ -44,7 +45,6 @@ export function getStaticProps(context) {
}
};
}
-
```bash
amplify override auth
@@ -62,12 +62,13 @@ Apply all the overrides in the `override(...)` function. For example, to update
import { AmplifyAuthCognitoStackTemplate } from '@aws-amplify/cli-extensibility-helper';
export function override(resources: AmplifyAuthCognitoStackTemplate) {
- resources.userPool.policies = { // Set the user pool policies
+ resources.userPool.policies = {
+ // Set the user pool policies
passwordPolicy: {
- ...resources.userPool.policies["passwordPolicy"], // Carry over existing settings
+ ...resources.userPool.policies['passwordPolicy'], // Carry over existing settings
temporaryPasswordValidityDays: 3 // Add new setting not provided Amplify's default
}
- }
+ };
}
```
@@ -75,8 +76,7 @@ Or add a custom attribute to your Cognito user pool:
-Removing or adding an attribute on a Cognito userpool schema including default attributes (e.g. `email`) will cause errors such as
-`Invalid AttributeDataType input, consider using the provided AttributeDataType enum` as CloudFormation interprets this as schema change.
+Removing or adding an attribute on a Cognito userpool schema including default attributes (e.g. `email`) will cause errors such as `Invalid AttributeDataType input, consider using the provided AttributeDataType enum` as CloudFormation interprets this as schema change.
@@ -87,7 +87,7 @@ Custom attributes can not be renamed or deleted after you create them.
```ts
-import { AmplifyAuthCognitoStackTemplate } from '@aws-amplify/cli-extensibility-helper'
+import { AmplifyAuthCognitoStackTemplate } from '@aws-amplify/cli-extensibility-helper';
export function override(resources: AmplifyAuthCognitoStackTemplate) {
const myCustomAttribute = {
@@ -95,107 +95,107 @@ export function override(resources: AmplifyAuthCognitoStackTemplate) {
developerOnlyAttribute: false,
mutable: true,
name: 'my_custom_attribute',
- required: false,
- }
+ required: false
+ };
resources.userPool.schema = [
...(resources.userPool.schema as any[]), // Carry over existing attributes (example: email)
- myCustomAttribute,
- ]
+ myCustomAttribute
+ ];
}
```
You can override the following auth resources that Amplify generates:
-|Amplify-generated resource|Description|
-|-|-|
-|[customMessageConfirmationBucket](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html)|S3 bucket used for custom message triggers|
-|[snsRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)|SNS role for sending authentication-related messages|
-|[userPool](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html)|The Cognito user pool that enables user sign-up and sign-in|
-|[userPoolClientWeb](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html)|A Cognito user pool client for web apps|
-|[userPoolClient](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html)|A Cognito user pool client for mobile apps|
-|[identityPool](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html)|A Cognito identity pool to federate identities|
-|[identityPoolRoleMap](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypoolroleattachment.html)|Role mapping for authenticated and unauthenticated user roles|
-|[lambdaConfigPermissions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html)|Permissions for Lambda function to access Cognito user pool and identity pool |
-|[lambdaTriggerPermissions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM policy attached to Cognito Lambda triggers|
-|[userPoolClientLambda](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html)|Lambda function to fetch app client secret from user pool client|
-|[userPoolClientRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)|IAM Role for Lambda function to fetch app client secret from user pool client|
-|[userPoolClientLambdaPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy for Lambda function to fetch app client secret from user pool client|
-|[userPoolClientLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy to enable CloudWatch logging for Lambda function to fetch app client secret from user pool client|
-|[userPoolClientInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html)|Custom CloudFormation resource to fetch app client secret from user pool client|
-|[hostedUICustomResource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html)|Lambda function to enable Cognito user pool Hosted UI login|
-|[hostedUICustomResourcePolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy for Lambda function to enable Cognito user pool Hosted UI login|
-|[hostedUICustomResourceLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy to enable CloudWatch logging for Lambda function to enable Cognito user pool Hosted UI login|
-|[hostedUICustomResourceInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html)|Custom CloudFormation resource to enable Cognito user pool Hosted UI login|
-|[hostedUIProvidersCustomResource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html)|Lambda function to configure Hosted UI with 3rd party identity providers|
-|[hostedUIProvidersCustomResourcePolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy for Lambda function to configure Hosted UI with 3rd party identity provider|
-|[hostedUIProvidersCustomResourceLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy to enable CloudWatch logging for Lambda function to configure Hosted UI with 3rd party identity provider|
-|[hostedUIProvidersCustomResourceInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html)|Custom CloudFormation resource to configure Hosted UI with 3rd party identity provider|
-|[oAuthCustomResource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html)|Lambda function to enable OAuth|
-|[oAuthCustomResourcePolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy for OAuth custom CloudFormation resource|
-|[oAuthCustomResourceLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy to enable CloudWatch logging for OAuth Lambda function|
-|[oAuthCustomResourceInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html)|Custom CloudFormation resource to enable OAuth|
-|[mfaLambda](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html)|Lambda function to enable multi-factor authentication function|
-|[mfaLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy to enable CloudWatch logging for multi-factor authentication Lambda function|
-|[mfaLambdaPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy for multi-factor authentication Lambda function|
-|[mfaLambdaInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html)|Custom CloudFormation resource to enable multi-factor authentication|
-|[mfaLambdaRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)|IAM Execution Role for multi-factor authentication Lambda function|
-|[openIdLambda](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html)|Lambda function to enable OpenID Connect|
-|[openIdLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy to enable CloudWatch logging for OpenID Connect Lambda function|
-|[openIdLambdaIAMPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html)|IAM Policy to enable OpenID Connect Lambda function|
-|[openIdLambdaInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html)|Custom CloudFormation resource to enable OpenID Connect|
-|[openIdLambdaRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)|Lambda Execution Role for OpenID Connect Lambda function|
+| Amplify-generated resource | Description |
+| --- | --- |
+| [customMessageConfirmationBucket](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html) | S3 bucket used for custom message triggers |
+| [snsRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) | SNS role for sending authentication-related messages |
+| [userPool](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html) | The Cognito user pool that enables user sign-up and sign-in |
+| [userPoolClientWeb](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html) | A Cognito user pool client for web apps |
+| [userPoolClient](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html) | A Cognito user pool client for mobile apps |
+| [identityPool](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html) | A Cognito identity pool to federate identities |
+| [identityPoolRoleMap](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypoolroleattachment.html) | Role mapping for authenticated and unauthenticated user roles |
+| [lambdaConfigPermissions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html) | Permissions for Lambda function to access Cognito user pool and identity pool |
+| [lambdaTriggerPermissions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM policy attached to Cognito Lambda triggers |
+| [userPoolClientLambda](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html) | Lambda function to fetch app client secret from user pool client |
+| [userPoolClientRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) | IAM Role for Lambda function to fetch app client secret from user pool client |
+| [userPoolClientLambdaPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy for Lambda function to fetch app client secret from user pool client |
+| [userPoolClientLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy to enable CloudWatch logging for Lambda function to fetch app client secret from user pool client |
+| [userPoolClientInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html) | Custom CloudFormation resource to fetch app client secret from user pool client |
+| [hostedUICustomResource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html) | Lambda function to enable Cognito user pool Hosted UI login |
+| [hostedUICustomResourcePolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy for Lambda function to enable Cognito user pool Hosted UI login |
+| [hostedUICustomResourceLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy to enable CloudWatch logging for Lambda function to enable Cognito user pool Hosted UI login |
+| [hostedUICustomResourceInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html) | Custom CloudFormation resource to enable Cognito user pool Hosted UI login |
+| [hostedUIProvidersCustomResource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html) | Lambda function to configure Hosted UI with 3rd party identity providers |
+| [hostedUIProvidersCustomResourcePolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy for Lambda function to configure Hosted UI with 3rd party identity provider |
+| [hostedUIProvidersCustomResourceLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy to enable CloudWatch logging for Lambda function to configure Hosted UI with 3rd party identity provider |
+| [hostedUIProvidersCustomResourceInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html) | Custom CloudFormation resource to configure Hosted UI with 3rd party identity provider |
+| [oAuthCustomResource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html) | Lambda function to enable OAuth |
+| [oAuthCustomResourcePolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy for OAuth custom CloudFormation resource |
+| [oAuthCustomResourceLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy to enable CloudWatch logging for OAuth Lambda function |
+| [oAuthCustomResourceInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html) | Custom CloudFormation resource to enable OAuth |
+| [mfaLambda](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html) | Lambda function to enable multi-factor authentication function |
+| [mfaLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy to enable CloudWatch logging for multi-factor authentication Lambda function |
+| [mfaLambdaPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy for multi-factor authentication Lambda function |
+| [mfaLambdaInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html) | Custom CloudFormation resource to enable multi-factor authentication |
+| [mfaLambdaRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) | IAM Execution Role for multi-factor authentication Lambda function |
+| [openIdLambda](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html) | Lambda function to enable OpenID Connect |
+| [openIdLogPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy to enable CloudWatch logging for OpenID Connect Lambda function |
+| [openIdLambdaIAMPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html) | IAM Policy to enable OpenID Connect Lambda function |
+| [openIdLambdaInputs](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html) | Custom CloudFormation resource to enable OpenID Connect |
+| [openIdLambdaRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) | Lambda Execution Role for OpenID Connect Lambda function |
## Customize Amplify-generated Cognito user group resources
Apply all the overrides in the `override(...)` function. For example to add a path to the lambda execution role that facilitates the user pool group to role mapping:
+
```ts
import { AmplifyUserPoolGroupStackTemplate } from '@aws-amplify/cli-extensibility-helper';
export function override(resources: AmplifyUserPoolGroupStackTemplate) {
- resources.lambdaExecutionRole.path = "//" // Note: CFN does not allow you to modify the path after creation
+ resources.lambdaExecutionRole.path = '//'; // Note: CFN does not allow you to modify the path after creation
}
```
You can override the following user pool group resources that Amplify generates:
-|Amplify-generated resource|Description|
-|-|-|
-|[userPoolGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolgroup.html)|The map of user pool groups|
-|[userPoolGroupRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)|The map of user pool group roles|
-|[roleMapCustomResource](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html)|A custom CloudFormation resource to map user pool groups to their roles|
-|[lambdaExecutionRole](https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html)|Lambda execution role for the "user pool group"-to-role mapping function|
-|[roleMapLambdaFunction](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html)|The Lambda function that facilitates the user pool group to role mapping|
-
+| Amplify-generated resource | Description |
+| --- | --- |
+| [userPoolGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolgroup.html) | The map of user pool groups |
+| [userPoolGroupRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) | The map of user pool group roles |
+| [roleMapCustomResource](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.CustomResource.html) | A custom CloudFormation resource to map user pool groups to their roles |
+| [lambdaExecutionRole](https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html) | Lambda execution role for the "user pool group"-to-role mapping function |
+| [roleMapLambdaFunction](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html) | The Lambda function that facilitates the user pool group to role mapping |
## Customize Amplify-generated Cognito auth resources with social providers
Apply all the overrides in the `override(...)` function. For example to add social providers to your Cognito user pool:
```ts
-import { AmplifyAuthCognitoStackTemplate } from "@aws-amplify/cli-extensibility-helper";
+import { AmplifyAuthCognitoStackTemplate } from '@aws-amplify/cli-extensibility-helper';
export function override(resources: AmplifyAuthCognitoStackTemplate) {
resources.addCfnResource(
{
- type: "AWS::Cognito::UserPoolIdentityProvider",
+ type: 'AWS::Cognito::UserPoolIdentityProvider',
properties: {
AttributeMapping: {
- preferred_username: "email",
- email: "email"
+ preferred_username: 'email',
+ email: 'email'
},
ProviderDetails: {
- client_id: "test",
- client_secret: "test",
- authorize_scopes: "test",
+ client_id: 'test',
+ client_secret: 'test',
+ authorize_scopes: 'test'
},
- ProviderName: "LoginWithAmazon",
- ProviderType: "LoginWithAmazon",
+ ProviderName: 'LoginWithAmazon',
+ ProviderType: 'LoginWithAmazon',
UserPoolId: {
- Ref: "UserPool",
- },
- },
+ Ref: 'UserPool'
+ }
+ }
},
- "amazon-social-provider"
+ 'amazon-social-provider'
);
}
```
diff --git a/src/pages/[platform]/build-a-backend/auth/remember-device/index.mdx b/src/pages/[platform]/build-a-backend/auth/remember-device/index.mdx
index 961eb048056..b0702d93f1e 100644
--- a/src/pages/[platform]/build-a-backend/auth/remember-device/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/remember-device/index.mdx
@@ -2,7 +2,8 @@ import { getCustomStaticPath } from '@/utils/getCustomStaticPath';
export const meta = {
title: 'Remember a device',
- description: 'You can use the device related features of Amazon Cognito UserPools by enabling the Devices features. Go to your Cognito UserPool, click on Devices in Left Navigation Menu and chose one of User Opt In or Always.',
+ description:
+ 'You can use the device related features of Amazon Cognito UserPools by enabling the Devices features. Go to your Cognito UserPool, click on Devices in Left Navigation Menu and chose one of User Opt In or Always.',
platforms: [
'javascript',
'react-native',
@@ -16,13 +17,7 @@ export const meta = {
],
canonicalObjects: [
{
- platforms: [
- 'javascript',
- 'nextjs',
- 'vue',
- 'angular',
- 'react'
- ],
+ platforms: ['javascript', 'nextjs', 'vue', 'angular', 'react'],
canonicalPath: '/javascript/build-a-backend/auth/remember-device/'
}
]
@@ -32,7 +27,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/sdk/index.mdx b/src/pages/[platform]/build-a-backend/auth/sdk/index.mdx
index 9e6a89753b7..83b1fb00794 100644
--- a/src/pages/[platform]/build-a-backend/auth/sdk/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/sdk/index.mdx
@@ -10,7 +10,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
diff --git a/src/pages/[platform]/build-a-backend/auth/set-up-auth/index.mdx b/src/pages/[platform]/build-a-backend/auth/set-up-auth/index.mdx
index 4364e72472e..aabf43df63f 100644
--- a/src/pages/[platform]/build-a-backend/auth/set-up-auth/index.mdx
+++ b/src/pages/[platform]/build-a-backend/auth/set-up-auth/index.mdx
@@ -2,7 +2,8 @@ import { getCustomStaticPath } from '@/utils/getCustomStaticPath';
export const meta = {
title: 'Set up Amplify Auth',
- description: 'Amplify uses Amazon Cognito as the main authentication provider. Learn how to handle user registration, authentication, account recovery and other operations.',
+ description:
+ 'Amplify uses Amazon Cognito as the main authentication provider. Learn how to handle user registration, authentication, account recovery and other operations.',
platforms: [
'javascript',
'react-native',
@@ -16,13 +17,7 @@ export const meta = {
],
canonicalObjects: [
{
- platforms: [
- 'react',
- 'nextjs',
- 'vue',
- 'javascript',
- 'angular'
- ],
+ platforms: ['react', 'nextjs', 'vue', 'javascript', 'angular'],
canonicalPath: '/javascript/build-a-backend/auth/set-up-auth/'
}
]
@@ -32,7 +27,7 @@ export const getStaticPaths = async () => {
return getCustomStaticPath(meta.platforms);
};
-export function getStaticProps(context) {
+export function getStaticProps() {
return {
props: {
platform: context.params.platform,
@@ -433,8 +428,8 @@ The `Authenticator` component offers a simple way to add authentication flows in
```html