MagicLinkRequestForm
“Email me a sign-in link” form. Anonymous. Server responds 204 regardless of whether the email is registered — anti-enumeration — so the success state just tells the user to check their inbox.
Drop next to the LoginForm as an alternative login path. The AuthClient.verifyMagicLink call (on the /auth/magic-link/verify route) completes the round-trip; see CompleteMagicLinkFlow for the paired verifier.
Usage
import { MagicLinkRequestForm } from '@rw3iss/auth-client/preact/forms';
<MagicLinkRequestForm onSuccess={(resp) => navigate("/")} onError={(err) => console.error(err)}/>Props
| Name | Type | Description |
|---|---|---|
client | AuthClient | |
defaultEmail | string | |
successMessage | string | Override the success message. |
appCode | string | App code override. Defaults to the AuthClient’s configured one. |
onSuccess | () => void | |
onError | (err: Error) => void | |
className | string |