- Newest
- Most votes
- Most comments
Amplify's Authenticator UI component can help you implement authentication in your React/Vite app without having to build the sign-in flow from scratch. The file extension difference (.jsx vs .tsx) shouldn't be an issue for implementing Amplify Auth.
To properly set up authentication in your existing React/Vite app, follow these steps:
-
Create the amplify folder structure using
npm create amplify@latestas you've already done. -
Configure your authentication resource in
amplify/auth/resource.tsto define your sign-in methods (email, phone numbers, or external providers). -
Deploy your authentication resource using
npx ampx sandbox. This will generate anamplify_outputs.jsonfile that connects your frontend to the backend resources. -
Install the Authenticator UI component:
npm add @aws-amplify/ui-react
- Add the Authenticator component to your main app file. Since you're using .jsx files, you would add it to your main app component (similar to how it would be added to _app.tsx in a Next.js project).
Once you've added the Authenticator component to your app, you should be able to test the sign-up, sign-in, and sign-out functionality. You can also customize the Authenticator component to match your app's styling.
The key is ensuring that the Authenticator component is properly connected to your backend resources through the configuration in the amplify folder and the generated outputs file.
Sources
Set up Amplify Auth - AWS Amplify Gen 2 Documentation
Set up Amplify Auth - AWS Amplify Gen 2 Documentation
Set up Amplify Auth - AWS Amplify Gen 2 Documentation
answered a year ago
Relevant content
asked 2 years ago
asked 8 years ago
asked 4 years ago
- AWS OFFICIALUpdated 5 years ago
- AWS OFFICIALUpdated 5 years ago

Partially solved. The main issue in establishing the authenticator was that the program sometimes includes amplify_outputs.json in the gitignore file. I copied the file into src and git added the file to force it. However, I'm still unable to customize the Authentication from the Amplify console even after starting the sandbox and pushing my most recent build through Github Desktop. Right now the authentication shows up and I'm able to log into it. But it's ugly and I am not sure how to personalize it.