<LoginForm>
Similar to the <Form> component but optimized to easily introduce login, signup, and onboarding functionality into your custom app.
Overview
Use <LoginForm />
instead of <Form /> to display your login & signup flow. It provides critical authentication-related logic, including:
For logged out users, show the login or signup step of your flow. Prevent users from accessing your authenticated app until they log in.
Once a user logs in, display either the first-time onboarding flow (if included in your login form) or the authenticated part of your custom app.
(Optional) Automatically log the user out of the application after their session expires after a period of inactivity.
How to Build a Login Flow in Feathery
Tutorial: How to Embed Your Login Flow
Example Code
<LoginForm />
Prop | Type | Description |
---|---|---|
| Configuration props passed to the Feathery login flow, which is rendered as a <Form />. | |
|
| The user's authentication token. Setting this denotes the user as |
|
| If you don't specify this, Feathery will dynamically install the JS SDK itself that you can use with getAuthClient(). If you want to initialize this yourself and pass it to Feathery, you can do so with this prop. |
|
| A custom loader to show while waiting for auth network calls and, if applicable, your |
|
| OAuth 2.1 requires login paths to be whitelisted, so this prop allows you to specify a path you've whitelisted in your auth provider that the user should be directed to when showing the login flow. Defaults to |
|
| A callback function that runs after the auth SDK has been initialized. The function passes the SDK client as the single parameter. |
|
| A callback function that runs after the user has been successfully authenticated. This function will run to completion before the provider |
|
| A callback function that runs after the user has logged out. |
|
| Pass the authenticated portion of your app as |
Last updated