Skip to content

feat(auth): add signin/signup improvements#75

Open
chimenemking wants to merge 2 commits into
wigxel:stagingfrom
chimenemking:feat/auth-proper
Open

feat(auth): add signin/signup improvements#75
chimenemking wants to merge 2 commits into
wigxel:stagingfrom
chimenemking:feat/auth-proper

Conversation

@chimenemking
Copy link
Copy Markdown

@owonwo @prudentbird @Dominion77
Changes
✅ First Name and Last Name fields
✅ Zod validation (min 2 chars for names)
✅ Loading spinner during submission
✅ Toast notifications (success/error)
✅ Form persistence (name/email stay on error)
✅ Password fields clear for security
✅ Disabled inputs during submission
Files Changed
app/auth/[[...all]]/form.tsx
components/ui/loading-spinner.tsx
Screenshot (437)
Screenshot (438)
Screenshot (439)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

@chimenemking is attempting to deploy a commit to the Joseph Owonwo's projects Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread app/auth/[[...all]]/form.tsx Outdated
Comment thread app/auth/[[...all]]/form.tsx
Comment thread components/ui/loading-spinner.tsx Outdated
- Fix email validation syntax for zod v4 (z.email instead of z.string().email)
- Remove unnecessary useEffect for form reset, move logic to switchMode
- Replace custom LoadingSpinner with lucide-react Loader2
@chimenemking
Copy link
Copy Markdown
Author

Fixed all 3 issues. Ready for re-review 🌟 @prudentbird

}
}, [signUpState.success, redirectTo]);

useEffect(() => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just render an inline alert under the form input fields only when there's a value for error. that way you can remove the rest of the useEffects..


useEffect(() => {
if (signUpState.success) {
toast.success("Account created! Redirecting to onboarding...");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this toast isn't necessary since user get's redirected immediately after success...
https://react.dev/reference/react/useActionState

also this redirect should probably be sent from the server action. figure out an alternative without using useEffect

Comment thread next-env.d.ts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert changes to this file, unassociated to PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants