Do you want to request a feature or report a bug?
What is the expected behavior?
window.LOG_LEVEL = 'DEBUG'; in your app.Closing this issue as it's duplicated to #1203
This is still the first one that returns on search.
As of this writing the React UI Component library's rewrite, @aws-amplify/ui-react, no longer supports the customization of form fields when using the withAuthenticator
Instead, it is suggested to use the AmplifyAuthenticator and something like the following:
import React from 'react';
import { AmplifyAuthenticator, AmplifySignUp, AmplifySignOut } from '@aws-amplify/ui-react';
import { Auth, Hub } from 'aws-amplify';
function App() {
const [user, updateUser] = React.useState(null);
React.useEffect(() => {
Auth.currentAuthenticatedUser()
.then(user => updateUser(user))
.catch(() => console.log('No signed in user.'));
Hub.listen('auth', data => {
switch (data.payload.event) {
case 'signIn':
return updateUser(data.payload.data);
case 'signOut':
return updateUser(null);
}
});
}, [])
if (user) {
return (
<div>
<h1>Hello {user.username}</h1>
<AmplifySignOut />
</div>
)
}
return (
<div style={{ display: 'flex', justifyContent: 'center' }}>
<AmplifyAuthenticator>
<AmplifySignUp
slot="sign-up"
formFields={[
{ type: "username" },
{
type: "password",
label: "Custom Password Label",
placeholder: "custom password placeholder"
},
{ type: "email" }
]}
/>
</AmplifyAuthenticator>
</div>
);
}
export default App
https://docs.amplify.aws/ui/auth/authenticator/q/framework/react#hiding-a-form-field
We are currently investigating updating the withAuthenticator API to add this functionality for a future release.
Thanks @dabit3 . You're the best.
Most helpful comment
As of this writing the React UI Component library's rewrite,
@aws-amplify/ui-react, no longer supports the customization of form fields when using thewithAuthenticatorInstead, it is suggested to use the
AmplifyAuthenticatorand something like the following:https://docs.amplify.aws/ui/auth/authenticator/q/framework/react#hiding-a-form-field
We are currently investigating updating the
withAuthenticatorAPI to add this functionality for a future release.