From 2949ed3b9b8feece2a4d09999bcca9e25e722cc8 Mon Sep 17 00:00:00 2001 From: Hui Zhao Date: Fri, 28 Mar 2025 10:32:17 -0700 Subject: [PATCH 1/2] chore: add the docuemtnation about using lang query param --- .../[platform]/build-a-backend/server-side-rendering/index.mdx | 2 ++ .../build-a-backend/server-side-rendering/nextjs/index.mdx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx b/src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx index 1d39dd1292d..89b750f6174 100644 --- a/src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx +++ b/src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx @@ -277,6 +277,8 @@ With the above example, Amplify generates the following API routes: | `/api/auth/sign-in-callback` | Amazon Cognito Managed Login redirects an end user back to this route after signing in. Amplify exchanges auth tokens and stores them as HttpOnly cookies in the browser cookie store, then redirects the end user back to the route specified by the `redirectOnSignInComplete` parameter. | | `/api/auth/sign-out-callback` | Amazon Cognito Managed Login redirects an end user back to this route after signing out, Amplify revokes access token and refresh token and removes token cookies from browser cookie store, then redirects the end user back to the route specified by the `redirectOnSignOutComplete` parameter. | +For changing the language of the Amazon Cognito Managed Login pages, you can add the `lang` query parameter to the `/api/auth/sign-in` and `/api/auth/sign-up` routes. For example, `/api/auth/sign-in?lang=fr`. See [Managed login localization](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization) documentation for more details about the supported languages. + **Note:** A signing-out call involves multiple steps, including signing out from Amazon Cognito Managed Login, revoking tokens, and removing cookies. If the user closes the browser during the process, the following may occur: diff --git a/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx b/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx index d0df49315e1..84363129e61 100644 --- a/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx +++ b/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx @@ -266,6 +266,8 @@ With the above example, Amplify generates the following API routes: | `/api/auth/sign-in-callback` | Amazon Cognito Managed Login redirects an end user back to this route after signing in. Amplify exchanges auth tokens and stores them as HttpOnly cookies in the browser cookie store, then redirects the end user back to the route specified by the `redirectOnSignInComplete` parameter. | | `/api/auth/sign-out-callback` | Amazon Cognito Managed Login redirects an end user back to this route after signing out, Amplify revokes access token and refresh token and removes token cookies from browser cookie store, then redirects the end user back to the route specified by the `redirectOnSignOutComplete` parameter. | +For changing the language of the Amazon Cognito Managed Login pages, you can add the `lang` query parameter to the `/api/auth/sign-in` and `/api/auth/sign-up` routes. For example, `/api/auth/sign-in?lang=fr`. See [Managed login localization](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization) documentation for more details about the supported languages. + **Note:** A signing-out call involves multiple steps, including signing out from Amazon Cognito Managed Login, revoking tokens, and removing cookies. If the user closes the browser during the process, the following may occur: From a867e044f459917b20c9308268bdd1d72830eb30 Mon Sep 17 00:00:00 2001 From: Hui Zhao Date: Mon, 31 Mar 2025 09:14:59 -0700 Subject: [PATCH 2/2] chore: update wording --- .../[platform]/build-a-backend/server-side-rendering/index.mdx | 2 +- .../build-a-backend/server-side-rendering/nextjs/index.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx b/src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx index 89b750f6174..f4f8bb10981 100644 --- a/src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx +++ b/src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx @@ -277,7 +277,7 @@ With the above example, Amplify generates the following API routes: | `/api/auth/sign-in-callback` | Amazon Cognito Managed Login redirects an end user back to this route after signing in. Amplify exchanges auth tokens and stores them as HttpOnly cookies in the browser cookie store, then redirects the end user back to the route specified by the `redirectOnSignInComplete` parameter. | | `/api/auth/sign-out-callback` | Amazon Cognito Managed Login redirects an end user back to this route after signing out, Amplify revokes access token and refresh token and removes token cookies from browser cookie store, then redirects the end user back to the route specified by the `redirectOnSignOutComplete` parameter. | -For changing the language of the Amazon Cognito Managed Login pages, you can add the `lang` query parameter to the `/api/auth/sign-in` and `/api/auth/sign-up` routes. For example, `/api/auth/sign-in?lang=fr`. See [Managed login localization](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization) documentation for more details about the supported languages. +To customize the language of the Amazon Cognito Managed Login pages, you can add the `lang` query parameter to the `/api/auth/sign-in` and `/api/auth/sign-up` routes. For example, `/api/auth/sign-in?lang=fr`. Refer to the [Managed login localization documentation](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization) for more information on the supported languages. diff --git a/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx b/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx index 84363129e61..2a4e5aad7a4 100644 --- a/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx +++ b/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx @@ -266,7 +266,7 @@ With the above example, Amplify generates the following API routes: | `/api/auth/sign-in-callback` | Amazon Cognito Managed Login redirects an end user back to this route after signing in. Amplify exchanges auth tokens and stores them as HttpOnly cookies in the browser cookie store, then redirects the end user back to the route specified by the `redirectOnSignInComplete` parameter. | | `/api/auth/sign-out-callback` | Amazon Cognito Managed Login redirects an end user back to this route after signing out, Amplify revokes access token and refresh token and removes token cookies from browser cookie store, then redirects the end user back to the route specified by the `redirectOnSignOutComplete` parameter. | -For changing the language of the Amazon Cognito Managed Login pages, you can add the `lang` query parameter to the `/api/auth/sign-in` and `/api/auth/sign-up` routes. For example, `/api/auth/sign-in?lang=fr`. See [Managed login localization](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization) documentation for more details about the supported languages. +To customize the language of the Amazon Cognito Managed Login pages, you can add the `lang` query parameter to the `/api/auth/sign-in` and `/api/auth/sign-up` routes. For example, `/api/auth/sign-in?lang=fr`. Refer to the [Managed login localization documentation](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization) for more information on the supported languages.