diff --git a/src/pages/[platform]/build-a-backend/auth/concepts/external-identity-providers/index.mdx b/src/pages/[platform]/build-a-backend/auth/concepts/external-identity-providers/index.mdx index 9c8680d8c71..afec58f7e35 100644 --- a/src/pages/[platform]/build-a-backend/auth/concepts/external-identity-providers/index.mdx +++ b/src/pages/[platform]/build-a-backend/auth/concepts/external-identity-providers/index.mdx @@ -587,7 +587,7 @@ import 'aws-amplify/auth/enable-oauth-listener'; import { getCurrentUser, fetchUserAttributes } from 'aws-amplify/auth'; import { Hub } from 'aws-amplify/utils'; -Hub.listen("auth", ({ payload }) => { +Hub.listen("auth", async ({ payload }) => { switch (payload.event) { case "signInWithRedirect": const user = await getCurrentUser();