From 8594f4038ed0fa2b596fad57cd5b1cc92a630368 Mon Sep 17 00:00:00 2001 From: Chris Wilton-Magras Date: Wed, 6 Mar 2024 13:54:43 +0000 Subject: [PATCH] Amplify Auth username fields now labelled as Email --- frontend/src/AuthenticatedApp.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/frontend/src/AuthenticatedApp.tsx b/frontend/src/AuthenticatedApp.tsx index cbe466db0..371777107 100644 --- a/frontend/src/AuthenticatedApp.tsx +++ b/frontend/src/AuthenticatedApp.tsx @@ -15,6 +15,14 @@ import './Theme.css'; import './Authenticator.css'; /* eslint-enable import/order */ +const usernameFormField = { + username: { + label: 'Email address', + placeholder: 'alice@example.com', + isRequired: true, + }, +}; + Amplify.configure({ Auth: { Cognito: { @@ -58,11 +66,11 @@ const AuthenticatedApp = withAuthenticator( }, }, formFields: { + signIn: { + ...usernameFormField, + }, forgotPassword: { - username: { - placeholder: 'Enter your Email', - isRequired: true, - }, + ...usernameFormField, }, }, }