This sample showcases how to seamlessly add authentication and user management to your React app using Frontegg’s embedded login method.
- Redirect users to Frontegg’s embedded login
- Enable a fully integrated self-service portal
- Manage and track user authentication state
- Access and display user profile details
- Handle account state and data with ease
- Implement seamless account switching functionality
- Node.js
- npm (comes with Node.js)
You’ll also need a Frontegg account. Sign up for free to get started.
Don’t have an account yet? No worries. This project includes sandbox credentials so you can test it right away!
If you don’t have a Frontegg account or prefer to use the sandbox credentials, feel free to skip to step 2.
If you're using your own credentials, follow the guidelines below.
- Go to Frontegg Portal
- Get your application ID from [ENVIRONMENT] → Applications
- Get your Frontegg domain from the Frontegg Portal → [ENVIRONMENT] → Keys & domains
- This sample runs on
http://localhost:3000. You may need to addhttp://localhost:3000under → [ENVIRONMENT] → Keys & domains → Allowed origins - Update your application's credentials under
sanboxContextOptions
Run the following command:
git clone <repo>Run the following command:
npm installTo start the application, run:
npm startThe app will be available at http://localhost:3000.

