@main12/auth-login 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -154,11 +154,11 @@ Use the plugin's hooks to build your own UI with any component library (HeroUI,
|
|
|
154
154
|
| Hook | Returns | Key inputs |
|
|
155
155
|
|------|---------|------------|
|
|
156
156
|
| `useLoginFlow({ redirectTo, onPasswordLogin })` | `step, email, password, error, isLoading, handleEmailSubmit, handlePasswordSubmit, handleSendOtp, handleEditEmail` | `redirectTo: string`, `onPasswordLogin: (creds) => Promise<void>` |
|
|
157
|
-
| `useSignupFlow()` | `name, email, error, isLoading, setName, setEmail, handleSubmit` | none — manages its own state |
|
|
158
157
|
| `useForgotPasswordFlow()` | `email, error, isLoading, setEmail, handleSubmit` | none |
|
|
159
158
|
| `useVerifyOtpFlow({ email, purpose, redirectTo })` | `otp, error, isLoading, isResending, resendCooldown, setOtp, handleSubmit, handleResendCode` | `email: string`, `purpose: 'login'\|'signup'\|'password-reset'` |
|
|
160
159
|
| `useSetPasswordFlow({ redirectTo })` | `password, confirmPassword, error, isLoading, strength, setPassword, setConfirmPassword, handleSubmit` | `redirectTo: string` |
|
|
161
|
-
|
|
160
|
+
|
|
161
|
+
> **Signup note:** No hook needed — call `signup(name, email)` from `@main12/auth-login/client`, then redirect to `/verify-otp?email=...&purpose=signup`.
|
|
162
162
|
|
|
163
163
|
### Full Example: Custom Login Page
|
|
164
164
|
|
package/package.json
CHANGED