Login Embed Tutorial
Step-by-step guide to adding a login, signup, and onboarding flow to your website.
Last updated
Was this helpful?
Step-by-step guide to adding a login, signup, and onboarding flow to your website.
Last updated
Was this helpful?
Feathery is the easiest way to add login and signup functionality to your React app. This guide will get you started with a login form that wraps around a demo app via create-react-app
.
Afterwards, you will have a working React app with:
Customized login and sign up flow, complete with post-login onboarding questions
Secure, password-less email magic link sign up and login
Google One Tap signup and login
You need to set up a Feathery form with login functionality or use one of our prebuilt login templates. For this guide, we'll use the . If you do not use this template, you will need to configure your form to work with Stytch by following .
The most common way to create a starter app is with the CLI tool .
Once your starter app is generated, navigate to the directory that you just created. Then run the following command to install Feathery.
Next, create a file src/FeatheryConfig.js
and declare the following two variables with their appropriate values:
Open src/index.js
and add the following code to initialize Feathery.
Include your login flow via the LoginForm
component, and pass the authenticated portion of your application as children
of the LoginForm
. Edit your src/App.js
file to match this.
The <LoginForm />
component will render its children components after the user has logged in.
You're done! You now have an authenticated dashboard application accessible via a Feathery login flow.
As an example of what a functional React app with both login and URL routing might look like, we will include a basic URL router.
Now, add it to your src/App.js
file.
Feathery will dynamically load the appropriate JS SDK for your chosen auth integration. If you would like access to their SDK, you can listen to the event or fetch it directly via .