Search code examples
reactjsamazon-web-servicesaws-amplify

Missing Inputs on AWS Amplify Signup Form


I am using apmplify studio to configure authentication for an amplify react app. I chose username for login and chose email, profile and name for signup as shown in the image below. enter image description here

But when I do amplify pull and run the application with npm start, the signup form looks like enter image description here

It does not contain email, name, and profile inputs but when I submit by providing username and password, it shows me errors (visible on the form). After amplify pull, I have added the following two pieces of code in my application

import { withAuthenticator } from '@aws-amplify/ui-react';

and at the end

export default withAuthenticator(App);

Any idea what I might be doing wrong? I am developing this app by following the Udemy course if that may help identify the issue.


Solution

  • I am having the same problem. The Authenticator component (which is also the one used in withAuthenticator) is supposed to derive these automatically after doing amplify pull, but for some reason this doesn't work at the moment.

    I assume there is some configuration issue behind this, probably something with the user pools/identity pools since these come up a lot around authentication and Authenticator issues.

    As a workaround until the underlying issue is found you can work with the Authenticator component directly (wrap your App component with the Authenticator component instead of using withAuthenticator) and specify the signUpAttributes manually, as documented in here. In your case that would be signUpAttributes={['email', 'name', 'profile']}.

    I hope this helps! If you find the underlying issue I'd love to know as well since I couldn't get it myself.