diff --git a/src/directory/directory.mjs b/src/directory/directory.mjs index 1cba4a93edf..d2c9274d31f 100644 --- a/src/directory/directory.mjs +++ b/src/directory/directory.mjs @@ -2233,9 +2233,6 @@ export const directory = { { path: 'src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/api-graphql-concepts/index.mdx' }, - { - path: 'src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authorization-modes/index.mdx' - }, { path: 'src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authz-modes/index.mdx' }, diff --git a/src/fragments/lib-v1/analytics/flutter/getting-started/30_initAnalytics.mdx b/src/fragments/lib-v1/analytics/flutter/getting-started/30_initAnalytics.mdx index 282b63bbd91..62b1ed03765 100644 --- a/src/fragments/lib-v1/analytics/flutter/getting-started/30_initAnalytics.mdx +++ b/src/fragments/lib-v1/analytics/flutter/getting-started/30_initAnalytics.mdx @@ -18,7 +18,7 @@ Future _configureAmplify() async { -When running your app on MacOS you will need to enable keychain sharing in Xcode, as described in the [Project setup guide](/gen1/[platform]/prev/start/project-setup/platform-setup/#enable-keychain). +When running your app on macOS you will need to enable keychain sharing in Xcode, as described in the [Project setup guide](/gen1/[platform]/prev/start/project-setup/platform-setup/#enable-keychain). diff --git a/src/fragments/lib-v1/auth/common/device_features/common.mdx b/src/fragments/lib-v1/auth/common/device_features/common.mdx index be89a7351b8..7cecf6a0179 100644 --- a/src/fragments/lib-v1/auth/common/device_features/common.mdx +++ b/src/fragments/lib-v1/auth/common/device_features/common.mdx @@ -1,21 +1,13 @@ - - -The [device tracking and remembering](https://aws.amazon.com/blogs/mobile/tracking-and-remembering-devices-using-amazon-cognito-your-user-pools/) features are currently not available within the library when using the federated OAuth flow with Cognito User Pools or Hosted UI. - - - Remembering a device is useful in conjunction with Multi-Factor Authentication (MFA). If MFA is enabled for an Amazon Cognito user pool, end users have to type in a security code received via e-mail or SMS each time they want to sign in. This increases security but comes at the expense of the user's experience. Remembering a device allows the second factor requirement to be automatically met when the user signs in on that device, thereby reducing friction in the user experience. ## Configure Auth Category - Device remembering functionality does not work if you use one of the web UI sign in methods. - To enable remembered device functionality, open the Cognito User Pool console. To do this, **go to your project directory** and **issue the command**: diff --git a/src/fragments/lib-v1/auth/common/sms/flows.mdx b/src/fragments/lib-v1/auth/common/sms/flows.mdx index d91a800a4c5..7e35bf24ecf 100644 --- a/src/fragments/lib-v1/auth/common/sms/flows.mdx +++ b/src/fragments/lib-v1/auth/common/sms/flows.mdx @@ -84,7 +84,7 @@ import all1 from "/src/fragments/lib-v1/auth/common/sms/add_verification.mdx"; -### SMS MFA +### MFA import all2 from "/src/fragments/lib-v1/auth/common/sms/add_mfa.mdx"; @@ -108,7 +108,7 @@ import all4 from "/src/fragments/lib-v1/auth/common/sms/update_verification.mdx" -### SMS MFA +### MFA import all5 from "/src/fragments/lib-v1/auth/common/sms/update_mfa.mdx"; diff --git a/src/fragments/lib-v1/auth/flutter/access_credentials/10_fetchAuthSession.mdx b/src/fragments/lib-v1/auth/flutter/access_credentials/10_fetchAuthSession.mdx index 34434da6f25..882afe49c7c 100644 --- a/src/fragments/lib-v1/auth/flutter/access_credentials/10_fetchAuthSession.mdx +++ b/src/fragments/lib-v1/auth/flutter/access_credentials/10_fetchAuthSession.mdx @@ -1,5 +1,3 @@ -However, if you need to access them in relation to working with an API outside Amplify or want access to AWS specific identifying information (e.g. IdentityId), you can access these implementation details by calling fetchAuthSession on the Cognito Auth Plugin. This will return a `CognitoAuthSession`, which has additional attributes compared to `AuthSession`, which is typically returned by fetchAuthSession. See the example below: - ```dart Future fetchAuthSession() async { try { diff --git a/src/fragments/lib-v1/auth/flutter/device_features/20_forgetDevice.mdx b/src/fragments/lib-v1/auth/flutter/device_features/20_forgetDevice.mdx index be260d1d20f..253fb2c1ed4 100644 --- a/src/fragments/lib-v1/auth/flutter/device_features/20_forgetDevice.mdx +++ b/src/fragments/lib-v1/auth/flutter/device_features/20_forgetDevice.mdx @@ -18,9 +18,9 @@ Future forgetCurrentDevice() async { ```dart // A device that was fetched via Amplify.Auth.fetchDevices() -Future forgetSpecificDevice(AuthDevice myDevice) async { +Future forgetSpecificDevice(AuthDevice registeredDevice) async { try { - await Amplify.Auth.forgetDevice(myDevice); + await Amplify.Auth.forgetDevice(registeredDevice); safePrint('Forget device succeeded'); } on AuthException catch (e) { safePrint('Forget device failed with error: $e'); diff --git a/src/fragments/lib-v1/auth/flutter/getting_started/70_configureBackend.mdx b/src/fragments/lib-v1/auth/flutter/getting_started/70_configureBackend.mdx index cf7c8988832..c2c99e7707f 100644 --- a/src/fragments/lib-v1/auth/flutter/getting_started/70_configureBackend.mdx +++ b/src/fragments/lib-v1/auth/flutter/getting_started/70_configureBackend.mdx @@ -28,14 +28,6 @@ To push your changes to the cloud, **execute the command**: amplify push ``` -import ios3 from '/src/fragments/lib/auth/ios/getting_started/12_amplifyConfig.mdx'; - - - -import android4 from '/src/fragments/lib/auth/android/getting_started/12_amplifyConfig.mdx'; - - - import flutter5 from '/src/fragments/lib/auth/flutter/getting_started/12_amplifyConfig.mdx'; diff --git a/src/fragments/lib-v1/auth/flutter/signin_web_ui/10_cli_setup.mdx b/src/fragments/lib-v1/auth/flutter/signin_web_ui/10_cli_setup.mdx index 7611f0f2d31..d82b75a9ac0 100644 --- a/src/fragments/lib-v1/auth/flutter/signin_web_ui/10_cli_setup.mdx +++ b/src/fragments/lib-v1/auth/flutter/signin_web_ui/10_cli_setup.mdx @@ -20,7 +20,7 @@ In terminal, navigate to your project, run `amplify add auth` (or if you've alre ? Enter your redirect signout URI: `myapp://` ? Do you want to add another redirect signout URI - `No` + `Yes` ? Enter your redirect signout URI: `http://localhost:3000/` ? Do you want to add another redirect signout URI diff --git a/src/fragments/lib-v1/auth/flutter/signin_web_ui/20_platform_specific_setup.mdx b/src/fragments/lib-v1/auth/flutter/signin_web_ui/20_platform_specific_setup.mdx index 8a9b656f5db..5ad4064fde8 100644 --- a/src/fragments/lib-v1/auth/flutter/signin_web_ui/20_platform_specific_setup.mdx +++ b/src/fragments/lib-v1/auth/flutter/signin_web_ui/20_platform_specific_setup.mdx @@ -4,11 +4,11 @@ Sign-in with web UI will display the sign-in UI inside a webview. After the sign ## Platform Setup -

Web

+### Web To use Hosted UI in your Flutter web application locally, you must run the app with the `--web-port=3000` argument (with the value being whichever port you assigned to localhost host when configuring your redirect URIs). -

Android

+### Android Add the following `queries` element to the `AndroidManifest.xml` file in your app's `android/app/src/main` directory, as well as the following `intent-filter` to the `MainActivity` in the same file. @@ -36,12 +36,12 @@ Replace `myapp` with your redirect URI scheme as necessary: ``` -

macOS

+### macOS Open XCode and enable the App Sandbox capability and then select "Incoming Connections (Server)" under "Network". ![Incoming Connections setting selected in the App Sandbox section of the runner signing and capabilities tab.](/images/project-setup/flutter/mac/xcode-entitlements.png) -

iOS, Windows and Linux

+### iOS, Windows and Linux No specific platform configuration is required. diff --git a/src/fragments/lib-v1/auth/flutter/signin_with_custom_flow/30_signin.mdx b/src/fragments/lib-v1/auth/flutter/signin_with_custom_flow/30_signin.mdx index fa336a21b6d..46a9d82aad3 100644 --- a/src/fragments/lib-v1/auth/flutter/signin_with_custom_flow/30_signin.mdx +++ b/src/fragments/lib-v1/auth/flutter/signin_with_custom_flow/30_signin.mdx @@ -1,6 +1,6 @@ ```dart // Create state variables for the sign in status -var isSignedIn = false; +bool isSignedIn = false; String? challengeHint; Future signInCustomFlow(String username) async { diff --git a/src/fragments/lib-v1/auth/native_common/access_credentials/common.mdx b/src/fragments/lib-v1/auth/native_common/access_credentials/common.mdx index 8182803b1e9..dd5f85a26df 100644 --- a/src/fragments/lib-v1/auth/native_common/access_credentials/common.mdx +++ b/src/fragments/lib-v1/auth/native_common/access_credentials/common.mdx @@ -2,9 +2,7 @@ An intentional decision with Amplify Auth was to avoid any public methods exposi With Auth, you simply sign in and it handles everything else needed to keep the credentials up to date and vend them to the other categories. - However, if you need to access them in relation to working with an API outside Amplify or want access to AWS specific identifying information (e.g. IdentityId), you can access these implementation details by casting the result of fetchAuthSession as follows: - import android0 from '/src/fragments/lib-v1/auth/android/access_credentials/10_fetchAuthSession.mdx'; diff --git a/src/fragments/lib-v1/auth/native_common/signout/common.mdx b/src/fragments/lib-v1/auth/native_common/signout/common.mdx index f20aa7668f5..6c64e468271 100644 --- a/src/fragments/lib-v1/auth/native_common/signout/common.mdx +++ b/src/fragments/lib-v1/auth/native_common/signout/common.mdx @@ -1,10 +1,4 @@ - Invoke the `signOut` api to sign out a user from the Auth category. You can only have one user signed in at a given time. - - - -Invoke the `signOut` api to sign out a user from the Auth category. You can only have one user signed in at a given time. Calling signOut without any options will delete the local cache and keychain of the user and revoke the token if enabled on Amazon Cognito User Pools. If you would like to sign out of all devices, invoke the signOut api with advanced options. - import android0 from '/src/fragments/lib-v1/auth/android/signout/10_local_signout.mdx'; @@ -18,35 +12,15 @@ import flutter2 from '/src/fragments/lib-v1/auth/flutter/signout/10_local_signou - Calling signOut without any options will just delete the local cache and keychain of the user. If you would like to sign out of all devices, invoke the signOut api with advanced options. [Amazon Cognito now supports token revocation](https://aws.amazon.com/about-aws/whats-new/2021/06/amazon-cognito-now-supports-targeted-sign-out-through-refresh-token-revocation/) and the latest Amplify version will revoke Amazon Cognito tokens if the application is online. This means that the Cognito refresh token cannot be used anymore to generate new Access and Id Tokens. -Access and Id Tokens are short-lived (60 minutes by default but can be set from 5 minutes to 1 day). After revocation, these tokens cannot be used with Cognito User Pools anymore. However, they are still valid when used with other services like AppSync or API Gateway. - -For limiting subsequent calls to these other services after invalidating tokens, we recommend lowering token expiration time for your app client in the Cognito User Pools console. If you are using the Amplify CLI this can be accessed by running `amplify console auth`. - -Token revocation is enabled automatically on new Amazon Cognito User Pools, however existing User Pools must enable this feature, [using the Cognito Console or AWS CLI](https://docs.aws.amazon.com/cognito/latest/developerguide/token-revocation.html). - - - -## Token Revocation - -[Amazon Cognito now supports token revocation](https://aws.amazon.com/about-aws/whats-new/2021/06/amazon-cognito-now-supports-targeted-sign-out-through-refresh-token-revocation/). This means that the Cognito refresh token cannot be used anymore to generate new Access and Id Tokens. - -Access and Id Tokens are short-lived (60 minutes by default but can be set from 5 minutes to 1 day). After revocation, these tokens cannot be used with Cognito User Pools anymore. However, they are still valid when used with other services like AppSync or API Gateway. - -For limiting subsequent calls to these other services after invalidating tokens, we recommend lowering token expiration time for your app client in the Cognito User Pools console. If you are using the Amplify CLI this can be accessed by running `amplify console auth`. - -Token revocation is enabled automatically on new Amazon Cognito User Pools, however existing User Pools must enable this feature, [using the Cognito Console or AWS CLI](https://docs.aws.amazon.com/cognito/latest/developerguide/token-revocation.html). - +Access and Id Tokens are short-lived (60 minutes by default but can be set from 5 minutes to 1 day). After revocation, these tokens cannot be used with Cognito user pool anymore. However, they are still valid when used with other services like AppSync or API Gateway. - -## Global Sign Out +For limiting subsequent calls to these other services after invalidating tokens, we recommend lowering token expiration time for your app client in the Cognito user pool console. If you are using the Amplify CLI this can be accessed by running `amplify console auth`. -Calling signout with `globalSignOut = true` will invalidate all the Cognito User Pool tokens of the signed in user. If the user is signed into a device, they won't be authorized to perform a task that requires a valid token when a global signout is called from some other device. They need to sign in again to get valid tokens. - +Token revocation is enabled automatically on new Amazon Cognito user pools, however existing user pools must enable this feature, [using the Cognito Console or AWS CLI](https://docs.aws.amazon.com/cognito/latest/developerguide/token-revocation.html). import android3 from '/src/fragments/lib-v1/auth/android/signout/20_global_signout.mdx'; @@ -60,11 +34,9 @@ import flutter5 from '/src/fragments/lib-v1/auth/flutter/signout/20_global_signo - -Calling signout with `globalSignOut = true` will invalidate all the Cognito User Pool tokens of the signed in user. If the user is signed into a device, they won't be authorized to perform a task that requires a valid token when a global signout is called from some other device. They need to sign in again to get valid tokens. +Calling signout with `globalSignOut = true` will invalidate all the Cognito user pool tokens of the signed in user. If the user is signed into a device, they won't be authorized to perform a task that requires a valid token when a global signout is called from some other device. They need to sign in again to get valid tokens. Global signout functionality does not work if you use one of the web UI sign in methods. - diff --git a/src/fragments/lib-v1/datastore/native_common/real-time.mdx b/src/fragments/lib-v1/datastore/native_common/real-time.mdx index 26112dbea33..6cb54ebba04 100644 --- a/src/fragments/lib-v1/datastore/native_common/real-time.mdx +++ b/src/fragments/lib-v1/datastore/native_common/real-time.mdx @@ -2,7 +2,6 @@ You can subscribe to changes on your Models. This reacts dynamically to updates of data to the underlying Storage Engine, which could be the result of GraphQL Subscriptions as well as Queries or Mutations that run against the backing AppSync API if you are synchronizing with the cloud. - **NOTE:** AWS AppSync has an [adjustable limit of 100 subscriptions per connection](https://docs.aws.amazon.com/general/latest/gr/appsync.html). DataStore automatically subscribes to create, update, and delete mutations for all models. @@ -12,7 +11,6 @@ This means that GraphQL APIs with DataStore enabled are limited to 33 models and However, You can [request a service limit increase](https://console.aws.amazon.com/servicequotas/home/services/appsync/quotas/L-AA33EB36) from AWS AppSync to meet the real-time requirements of your application. - import js0 from '/src/fragments/lib-v1/datastore/js/real-time/observe-snippet.mdx'; diff --git a/src/fragments/lib-v1/graphqlapi/existing-resources.mdx b/src/fragments/lib-v1/graphqlapi/existing-resources.mdx index ec626f0a5d4..6b0ac176068 100644 --- a/src/fragments/lib-v1/graphqlapi/existing-resources.mdx +++ b/src/fragments/lib-v1/graphqlapi/existing-resources.mdx @@ -18,18 +18,9 @@ Existing AWS AppSync resources can be used with the Amplify Libraries by referen } ``` - - **API NAME**: Friendly name for the API (e.g., _api_) - **endpoint**: The HTTPS endpoint of the AWS AppSync API (e.g. `https://aaaaaaaaaaaaaaaaaaaaaaaaaa.appsync-api.us-east-1.amazonaws.com/graphql`). [Custom domain names](https://docs.aws.amazon.com/appsync/latest/devguide/custom-domain-name.html) can also be supplied here (e.g. `https://api.yourdomain.com/graphql`). Custom domain names can have any format, but must end with `/graphql` (see https://graphql.org/learn/serving-over-http/#uris-routes). - **region**: AWS Region where the resources are provisioned (e.g. _us-east-1_) - **authorizationType**: Authorization mode for accessing the API. This can be one of: `AMAZON_COGNITO_USER_POOLS`, `AWS_IAM`, `OPENID_CONNECT`, or `API_KEY`. Each mode requires additional configuration parameters. See [Configure authorization modes](/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authz-modes) for details. - - - -- **API NAME**: Friendly name for the API (e.g., _api_) - - **endpoint**: The HTTPS endpoint of the AWS AppSync API (e.g. `https://aaaaaaaaaaaaaaaaaaaaaaaaaa.appsync-api.us-east-1.amazonaws.com/graphql`). [Custom domain names](https://docs.aws.amazon.com/appsync/latest/devguide/custom-domain-name.html) can also be supplied here (e.g. `https://api.yourdomain.com/graphql`). Custom domain names can have any format, but must end with `/graphql` (see https://graphql.org/learn/serving-over-http/#uris-routes). - - **region**: AWS Region where the resources are provisioned (e.g. _us-east-1_) - - **authorizationType**: Authorization mode for accessing the API. This can be one of: `AMAZON_COGNITO_USER_POOLS`, `AWS_IAM`, `OPENID_CONNECT`, or `API_KEY`. Each mode requires additional configuration parameters. See [Configure authorization modes](/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authorization-modes) for details. - Note that before you can add an AWS resource to your application, the application must have the Amplify libraries installed. If you need to perform this step, see [Install Amplify Libraries](/gen1/[platform]/prev/start/project-setup/create-application/#n2-install-amplify-libraries). diff --git a/src/fragments/lib-v1/graphqlapi/flutter/authz.mdx b/src/fragments/lib-v1/graphqlapi/flutter/authz.mdx index f7e505dc2ba..4643acd1a8a 100644 --- a/src/fragments/lib-v1/graphqlapi/flutter/authz.mdx +++ b/src/fragments/lib-v1/graphqlapi/flutter/authz.mdx @@ -38,7 +38,7 @@ and under the `awsAPIPlugin` ``` -import flutter0 from "/src/fragments/lib/graphqlapi/flutter/authz/10_userpool.mdx"; +import flutter0 from "/src/fragments/lib-v1/graphqlapi/flutter/authz/10_userpool.mdx"; @@ -78,7 +78,7 @@ and under the `awsAPIPlugin` #### OIDC -import flutter1 from "/src/fragments/lib/graphqlapi/flutter/authz/20_oidc.mdx"; +import flutter1 from "/src/fragments/lib-v1/graphqlapi/flutter/authz/20_oidc.mdx"; @@ -108,7 +108,7 @@ The `friendly_name` illustrated here is created from Amplify CLI prompt. There a "authorizationType": "API_KEY", "apiKey": "[API_KEY]" }, - "[FRIENDLY-NAME-API-WITH-IAM": { + "[FRIENDLY-NAME-API-WITH-IAM"]: { "endpointType": "GraphQL", "endpoint": "[GRAPHQL-ENDPOINT]", "region": "[REGION]", @@ -134,6 +134,6 @@ The `friendly_name` illustrated here is created from Amplify CLI prompt. There a The `GRAPHQL-ENDPOINT` from AWS AppSync will look similar to `https://xyz.appsync-api.us-west-2.amazonaws.com/graphql`. -import flutter2 from "/src/fragments/lib/graphqlapi/flutter/authz/30_multi.mdx"; +import flutter2 from "/src/fragments/lib-v1/graphqlapi/flutter/authz/30_multi.mdx"; diff --git a/src/fragments/lib-v1/graphqlapi/flutter/authz/21_oidc.mdx b/src/fragments/lib-v1/graphqlapi/flutter/authz/21_oidc.mdx index 03dc4ca4b17..9576869702b 100644 --- a/src/fragments/lib-v1/graphqlapi/flutter/authz/21_oidc.mdx +++ b/src/fragments/lib-v1/graphqlapi/flutter/authz/21_oidc.mdx @@ -15,6 +15,6 @@ class CustomOIDCProvider extends OIDCAuthProvider { } ``` -import warning from "/src/fragments/lib/graphqlapi/flutter/authz/2X_add_plugin.mdx"; +import warning from "/src/fragments/lib-v1/graphqlapi/flutter/authz/2X_add_plugin.mdx"; diff --git a/src/fragments/lib-v1/graphqlapi/flutter/authz/22_lambda.mdx b/src/fragments/lib-v1/graphqlapi/flutter/authz/22_lambda.mdx index cedc5024efe..6e5f0094abd 100644 --- a/src/fragments/lib-v1/graphqlapi/flutter/authz/22_lambda.mdx +++ b/src/fragments/lib-v1/graphqlapi/flutter/authz/22_lambda.mdx @@ -9,6 +9,6 @@ class CustomFunctionProvider extends FunctionAuthProvider { } ``` -import warning from "/src/fragments/lib/graphqlapi/flutter/authz/2X_add_plugin.mdx"; +import warning from "/src/fragments/lib-v1/graphqlapi/flutter/authz/2X_add_plugin.mdx"; diff --git a/src/fragments/lib-v1/graphqlapi/native_common/advanced-workflows/common.mdx b/src/fragments/lib-v1/graphqlapi/native_common/advanced-workflows/common.mdx index 34bec1704bf..ebb73108dd8 100644 --- a/src/fragments/lib-v1/graphqlapi/native_common/advanced-workflows/common.mdx +++ b/src/fragments/lib-v1/graphqlapi/native_common/advanced-workflows/common.mdx @@ -138,15 +138,9 @@ import flutter5 from '/src/fragments/lib-v1/graphqlapi/flutter/advanced-workflow -## Combining multiple GraphQL operations in a single request +## Combining Multiple Operations - When you want to perform more than one operation in a single request, you can place them within the same document. For example, to retrieve a Post and a Todo - - - -GraphQL allows you to run multiple GraphQL operations (queries/mutations) as part of a single network request from the client code. To perform multiple operations in a single request, you can place them within the same GraphQL document. For example, to retrieve a Post and a Todo: - import ios6 from '/src/fragments/lib-v1/graphqlapi/ios/advanced-workflows/40_multiple.mdx'; @@ -160,25 +154,15 @@ import flutter7 from '/src/fragments/lib-v1/graphqlapi/flutter/advanced-workflow - - - -Combining multiple GraphQL requests on the client-side is different than server-side transaction support. To run multiple transactions as a batch operation refer to the [Batch Put Custom Resolver](/gen1/[platform]/build-a-backend/graphqlapi/best-practice/batch-put-custom-resolver/) example. - - - - ## Adding Headers to Outgoing Requests By default, the API plugin includes appropriate authorization headers on your outgoing requests. However, you may have an advanced use case where you wish to send additional request headers to AppSync. - If your API does not require any authorization or if you would like manipulate the request yourself, please refer to the [Set authorization mode to NONE](/gen1/[platform]/build-a-backend/graphqlapi/customize-authz-modes/#none) - import ios8 from '/src/fragments/lib-v1/graphqlapi/ios/advanced-workflows/50_interceptor.mdx'; diff --git a/src/fragments/lib-v1/graphqlapi/native_common/getting-started/common.mdx b/src/fragments/lib-v1/graphqlapi/native_common/getting-started/common.mdx index 5ced147f81d..5af5112b801 100644 --- a/src/fragments/lib-v1/graphqlapi/native_common/getting-started/common.mdx +++ b/src/fragments/lib-v1/graphqlapi/native_common/getting-started/common.mdx @@ -141,8 +141,6 @@ Congratulations! You've created a `Todo` object in your database. Check out the - [Update data](/gen1/[platform]/prev/build-a-backend/graphqlapi/mutate-data/) - [Subscribe to data](/gen1/[platform]/prev/build-a-backend/graphqlapi/subscribe-data/) - [Concepts](/gen1/[platform]/prev/build-a-backend/graphqlapi/api-graphql-concepts/) - - [Configure authorization modes](/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authz-modes) - {/* TODO: * [Authorizing API calls with Cognito User Pool] */} diff --git a/src/fragments/lib-v1/restapi/flutter/delete.mdx b/src/fragments/lib-v1/restapi/flutter/delete.mdx index cb77bc8e9c1..98061be5ff8 100644 --- a/src/fragments/lib-v1/restapi/flutter/delete.mdx +++ b/src/fragments/lib-v1/restapi/flutter/delete.mdx @@ -5,9 +5,9 @@ Future deleteTodo() async { try { final restOperation = Amplify.API.delete('todo/1'); final response = await restOperation.response; - print('DELETE call succeeded: ${response.decodeBody()}'); + safePrint('DELETE call succeeded: ${response.decodeBody()}'); } on ApiException catch (e) { - print('DELETE call failed: $e'); + safePrint('DELETE call failed: $e'); } } ``` diff --git a/src/fragments/lib/analytics/flutter/getting-started/30_initAnalytics.mdx b/src/fragments/lib/analytics/flutter/getting-started/30_initAnalytics.mdx index 42ff7438720..5b4dfc96134 100644 --- a/src/fragments/lib/analytics/flutter/getting-started/30_initAnalytics.mdx +++ b/src/fragments/lib/analytics/flutter/getting-started/30_initAnalytics.mdx @@ -18,7 +18,7 @@ Future _configureAmplify() async { -When running your app on MacOS you will need to enable keychain sharing in Xcode, as described in the [Project setup guide](/gen1/[platform]/start/project-setup/platform-setup/#enable-keychain). +When running your app on macOS you will need to enable keychain sharing in Xcode, as described in the [Project setup guide](/gen1/[platform]/start/project-setup/platform-setup/#enable-keychain). diff --git a/src/fragments/lib/auth/flutter/signin_web_ui/20_platform_specific_setup.mdx b/src/fragments/lib/auth/flutter/signin_web_ui/20_platform_specific_setup.mdx index 8a9b656f5db..5ad4064fde8 100644 --- a/src/fragments/lib/auth/flutter/signin_web_ui/20_platform_specific_setup.mdx +++ b/src/fragments/lib/auth/flutter/signin_web_ui/20_platform_specific_setup.mdx @@ -4,11 +4,11 @@ Sign-in with web UI will display the sign-in UI inside a webview. After the sign ## Platform Setup -

Web

+### Web To use Hosted UI in your Flutter web application locally, you must run the app with the `--web-port=3000` argument (with the value being whichever port you assigned to localhost host when configuring your redirect URIs). -

Android

+### Android Add the following `queries` element to the `AndroidManifest.xml` file in your app's `android/app/src/main` directory, as well as the following `intent-filter` to the `MainActivity` in the same file. @@ -36,12 +36,12 @@ Replace `myapp` with your redirect URI scheme as necessary: ``` -

macOS

+### macOS Open XCode and enable the App Sandbox capability and then select "Incoming Connections (Server)" under "Network". ![Incoming Connections setting selected in the App Sandbox section of the runner signing and capabilities tab.](/images/project-setup/flutter/mac/xcode-entitlements.png) -

iOS, Windows and Linux

+### iOS, Windows and Linux No specific platform configuration is required. diff --git a/src/fragments/lib/flutter.mdx b/src/fragments/lib/flutter.mdx index 7319007f8b2..0564e19914e 100644 --- a/src/fragments/lib/flutter.mdx +++ b/src/fragments/lib/flutter.mdx @@ -2,7 +2,7 @@ Welcome to the Amplify Flutter documentation. To stay up to date with the latest changes and provide feedback, please take a look at our [GitHub repo](https://github.com/aws-amplify/amplify-flutter) or join us on [Discord](https://discord.gg/jWVbPfC). -The stable release of Amplify Flutter currently supports iOS, Android, Web, Windows, MacOS, and Linux as target platforms. Currently Push Notifications and DataStore are supported for only iOS and Android. +The stable release of Amplify Flutter currently supports iOS, Android, Web, Windows, macOS, and Linux as target platforms. Currently Push Notifications and DataStore are supported for only iOS and Android. Get Started diff --git a/src/fragments/lib/geo/ios/device_tracking/10_tracking_options.mdx b/src/fragments/lib/geo/ios/device_tracking/10_tracking_options.mdx index 1afdf8b12ce..2e1a0ed6fbd 100644 --- a/src/fragments/lib/geo/ios/device_tracking/10_tracking_options.mdx +++ b/src/fragments/lib/geo/ios/device_tracking/10_tracking_options.mdx @@ -6,9 +6,9 @@ **`allowsBackgroundLocationUpdates`** | `false` | If true, location updates will be received from the OS when the app is in the background. **`pausesLocationUpdatesAutomatically`** | `true` | If true, allow the OS to pause location updates to optimize battery usages. **`activityType`** | `.automotive-` `Navigation` | If `pausesLocationUpdatesAutomatically` is true, the OS will decide appropriate times to pause location updates to improve battery life based on the `activityType`. -**`showsBackgroundLocationIndicator`** | `false` | If true and `requestAlwaysAuthorization` is true, the background location indicator is displayed and visible to the users. This option is not supported on MacOS. +**`showsBackgroundLocationIndicator`** | `false` | If true and `requestAlwaysAuthorization` is true, the background location indicator is displayed and visible to the users. This option is not supported on macOS. **`disregardLocationUpdatesWhenOffline`** | `false` | If true, the app will not store location updates when the app is offline. This is false by default; Amplify will store location updates locally due to loss of network connectivity and send location updates when app is online. **`wakeAppForSignificantLocationChanges`** | `false` | If true, the app will be woken up by significant location updates after an app has been force closed. In order to take advantage of this, you'll need to call `Amplify.Geo.startTracking()` in your apps launch lifecycle method. (e.g. `didFinishedLoading`) **`distanceFilter`** | `0` | If set, the minimum distance in meters at which the OS will update the app with a new location. **`trackUntil`** | `.distantFuture` | If set, the app will stop tracking when date is reached. By default, tracking will continue until user logOut or `stopTracking()` is called. -**`batchingOptions`** | `.none` | Custom defined behavior to send location updates in batches based on a specified threshold. \ No newline at end of file +**`batchingOptions`** | `.none` | Custom defined behavior to send location updates in batches based on a specified threshold. diff --git a/src/fragments/lib/project-setup/flutter/platform-setup/macos.mdx b/src/fragments/lib/project-setup/flutter/platform-setup/macos.mdx index 7656a345740..2e02deac857 100644 --- a/src/fragments/lib/project-setup/flutter/platform-setup/macos.mdx +++ b/src/fragments/lib/project-setup/flutter/platform-setup/macos.mdx @@ -14,7 +14,7 @@ Open your project in Xcode and select Runner, Targets -> Runner and then the "Ge Select Runner, Project -> Runner and then the "Info" tab. Update "macOS Deployment Target" to 10.15 or higher. -![Setting the macOS version to 10.15 or higher in the MacOS Deployment Target tab of the Runner info section.](/images/project-setup/flutter/mac/project-min-deployment-version.png) +![Setting the macOS version to 10.15 or higher in the macOS Deployment Target tab of the Runner info section.](/images/project-setup/flutter/mac/project-min-deployment-version.png) ### Enable Network Calls diff --git a/src/pages/[platform]/build-a-backend/add-aws-services/analytics/set-up-analytics/index.mdx b/src/pages/[platform]/build-a-backend/add-aws-services/analytics/set-up-analytics/index.mdx index 78130859cd0..a50de0854cf 100644 --- a/src/pages/[platform]/build-a-backend/add-aws-services/analytics/set-up-analytics/index.mdx +++ b/src/pages/[platform]/build-a-backend/add-aws-services/analytics/set-up-analytics/index.mdx @@ -297,7 +297,7 @@ Future _configureAmplify() async { -When running your app on MacOS you will need to enable keychain sharing in Xcode, as described in the [Project setup guide](/gen1/[platform]/start/project-setup/platform-setup/#enable-keychain). +When running your app on macOS you will need to enable keychain sharing in Xcode, as described in the [Project setup guide](/gen1/[platform]/start/project-setup/platform-setup/#enable-keychain). diff --git a/src/pages/gen1/[platform]/prev/build-a-backend/auth/existing-resources/index.mdx b/src/pages/gen1/[platform]/prev/build-a-backend/auth/existing-resources/index.mdx index 73af5f8f12a..b7bf6aa37e0 100644 --- a/src/pages/gen1/[platform]/prev/build-a-backend/auth/existing-resources/index.mdx +++ b/src/pages/gen1/[platform]/prev/build-a-backend/auth/existing-resources/index.mdx @@ -4,7 +4,7 @@ export const meta = { title: 'Use existing Amazon Cognito resources', description: 'Configure the Amplify Libraries to use existing Amazon Cognito resources by referencing them in your configuration.', - platforms: ['swift', 'android', 'flutter'] + platforms: ['flutter', 'swift', 'android'] }; export const getStaticPaths = async () => { diff --git a/src/pages/gen1/[platform]/prev/build-a-backend/auth/manage-mfa/index.mdx b/src/pages/gen1/[platform]/prev/build-a-backend/auth/manage-mfa/index.mdx index b855e9df6cf..aa180892631 100644 --- a/src/pages/gen1/[platform]/prev/build-a-backend/auth/manage-mfa/index.mdx +++ b/src/pages/gen1/[platform]/prev/build-a-backend/auth/manage-mfa/index.mdx @@ -829,6 +829,6 @@ Now that you completed setting up multi-factor authentication you may also want -import flows from '/src/fragments/lib/auth/common/mfa/flows.mdx'; +import flows from '/src/fragments/lib-v1/auth/common/mfa/flows.mdx'; - + diff --git a/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/advanced-workflows/index.mdx b/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/advanced-workflows/index.mdx index 0c42691fa7f..a630ae0f945 100644 --- a/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/advanced-workflows/index.mdx +++ b/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/advanced-workflows/index.mdx @@ -1,7 +1,7 @@ import { getCustomStaticPath } from '@/utils/getCustomStaticPath'; export const meta = { - title: 'Advanced Workflows', + title: 'Advanced workflows', description: "Learn more about advanced workflows in Amplify's API category", platforms: [ 'flutter', diff --git a/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authorization-modes/index.mdx b/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authorization-modes/index.mdx deleted file mode 100644 index da491867f15..00000000000 --- a/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authorization-modes/index.mdx +++ /dev/null @@ -1,53 +0,0 @@ -import { getCustomStaticPath } from '@/utils/getCustomStaticPath'; - -export const meta = { - title: 'Configure authorization modes', - description: - "Learn more about how to configure authorization modes in Amplify's API category", - platforms: ['flutter'] -}; - -export const getStaticPaths = async () => { - return getCustomStaticPath(meta.platforms); -}; - -export function getStaticProps(context) { - return { - props: { - platform: context.params.platform, - meta - } - }; -} - -import flutter_maintenance from '/src/fragments/lib-v1/flutter-maintenance.mdx'; - - - -import ios0 from '/src/fragments/lib/graphqlapi/native_common/authz/common.mdx'; - - - -import android1 from '/src/fragments/lib/graphqlapi/native_common/authz/common.mdx'; - - - -import js2 from '/src/fragments/lib/graphqlapi/js/authz.mdx'; - - - -import reactnative0 from '/src/fragments/lib/graphqlapi/js/authz.mdx'; - - - -import flutter3 from '/src/fragments/lib-v1/graphqlapi/native_common/authz/common.mdx'; - - diff --git a/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authz-modes/index.mdx b/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authz-modes/index.mdx index b395a0f5ca6..145cdc29265 100644 --- a/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authz-modes/index.mdx +++ b/src/pages/gen1/[platform]/prev/build-a-backend/graphqlapi/customize-authz-modes/index.mdx @@ -8,6 +8,7 @@ export const meta = { 'react-native', 'swift', 'android', + 'flutter', 'angular', 'nextjs', 'react',