Sign up
A card that creates an account. By default its button opens the hosted sign-up page.
Installation
- npm
- pnpm
- Yarn
- Bun
npm install @lumoauth/react
pnpm add @lumoauth/react
yarn add @lumoauth/react
bun add @lumoauth/react
Usage
src/pages/SignUp.tsx
import { SignUp } from '@lumoauth/react';
export default function SignUpPage() {
return <SignUp afterSignUpUrl="/welcome" signInUrl="/sign-in" />;
}
Sign-up in your own form
The provider's authStrategy="password" shows fields for the name, the email address and the password. LumoAuth has no API that creates an account from such a form, so in @lumoauth/react 1.7.0 the button of this form throws an error. Keep the default strategy: the button opens the hosted sign-up page, which offers every method that your organization turned on.
Props
| Prop | Type | Description |
|---|---|---|
afterSignUpUrl | string | Where to go after sign-up. Defaults to the afterSignUpUrl of the provider. |
signInUrl | string | The address of your sign-in page, for the link under the card. |
appearance | AppearanceProps | Theme, CSS variables and class name for this card. See Theming. |