<AuthCard />
The <AuthCard />
component provides an interactive and customizable authentication interface that seamlessly integrates with your authentication flow. It supports multiple authentication methods, including email/password, magic links, passkey (WebAuthn), and social providers.
Usage
Here's a basic example on how to use the <AuthCard />
component within your application:
Reference
The following props can be passed to <AuthCard />
for customization:
Prop | Type | Default |
---|---|---|
className? | string | - |
classNames? | AuthCardClassNames | - |
callbackURL? | string | - |
localization? | AuthLocalization | authLocalization |
pathname? | string | - |
redirectTo? | string | - |
socialLayout? | "auto" | "horizontal" | "grid" | "vertical" | "auto" |
view? | AuthView | - |
Examples
Below are practical usage examples demonstrating common scenarios:
Specifying Initial View
You can specify the current view manually using the view
prop:
Custom Redirect After Authentication
Customize the navigation after successful authentication using the redirectTo
prop:
Localization
You can pass custom localization texts to fit different languages or contexts:
Styling
You can thoroughly customize <AuthCard />
components using TailwindCSS utility classes and the provided classNames
prop: