Feathery-Hosted (Recommended)
Have Feathery host your login flow at a custom subdomain in a fully no-code setup. Your login flow communicates with the rest of your site via redirects.
In this approach, Feathery hosts your login flow at a separate subdomain from the rest of your site. It's an established approach that's easy to set up without code.
All of our login template previews are set up this way, such as our SaaS Signup & Onboarding template. To test out the functionality, click Preview Template
. You'll log directly into our demo app, and its example code is on Github.
Steps
Go to your Feathery settings, then select the
Branding
tab. Set up your custom Feathery domain, and choose your login flow to be the apex form.Set up a CNAME DNS record redirecting from the subdomain you want your login flow to live on (e.g.
login.company.com
) to your custom Feathery subdomain (i.e.company.feathery.io
).In your login form settings, set the
Redirect URL
to be the site you want your users to access after they log in.
Advanced functionality (optional)
Afterwards, you may want to add additional auth functionality to your logged-in site, like redirecting users to the login flow if they aren't logged in, allowing users to log out, and authorizing requests to your server.
To add logout to your logged-in site, you can embed a Feathery form that's just a single button that performs a logout
action. Otherwise, you'll need to write custom code.
Custom Code
If you choose to use Feathery's Stytch integration, your users' auth info will be automatically configured to be sharable between your subdomains of the same domain.
That means you can install and use Stytch's Javascript library on your custom site. After initializing their library with the same Stytch project as the Feathery integration, their library will automatically detect the logged-in cookies from the login flow. From that point, it's easy to use the Stytch library to:
Redirect to the login flow if the user isn't logged in
Log the user out manually
Access JWT tokens
And more
Last updated