Files
agentic-coding-starter-kit/create-agentic-app/template/src/app/(auth)/forgot-password/page.tsx
Auto f29d296816 feat: replace Google OAuth with email/password authentication
Replace Google OAuth provider with email/password authentication to reduce
friction for MVP development and vibe coding workflows.

Changes:
- Remove Google OAuth configuration from auth.ts
- Add emailAndPassword provider with enabled: true
- Add email verification with sendOnSignUp: true
- Add password reset functionality
- Log verification and reset URLs to terminal (no email integration yet)

New auth pages (src/app/(auth)/):
- /login - Sign in page
- /register - Sign up page
- /forgot-password - Password reset request
- /reset-password - Password reset completion

New components (src/components/auth/):
- sign-up-form.tsx - Registration form
- forgot-password-form.tsx - Password reset request form
- reset-password-form.tsx - Password reset form

Updated components:
- sign-in-button.tsx - Now email/password form instead of Google button
- user-profile.tsx - Shows Sign in/Sign up buttons when logged out

Bug fixes:
- Fix React render error in profile page by wrapping router.push in useEffect

Config updates:
- Remove GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET from env.example
- Update CLAUDE.md documentation to reflect email/password auth
- Add requestPasswordReset, resetPassword, sendVerificationEmail to auth-client exports

All changes applied to both main project and create-agentic-app template.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 05:50:43 +02:00

36 lines
1009 B
TypeScript

import { headers } from "next/headers"
import { redirect } from "next/navigation"
import { ForgotPasswordForm } from "@/components/auth/forgot-password-form"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card"
import { auth } from "@/lib/auth"
export default async function ForgotPasswordPage() {
const session = await auth.api.getSession({ headers: await headers() })
if (session) {
redirect("/dashboard")
}
return (
<div className="flex min-h-[calc(100vh-4rem)] items-center justify-center p-4">
<Card className="w-full max-w-md">
<CardHeader className="text-center">
<CardTitle>Forgot password</CardTitle>
<CardDescription>
Enter your email address and we&apos;ll send you a reset link
</CardDescription>
</CardHeader>
<CardContent className="flex flex-col items-center">
<ForgotPasswordForm />
</CardContent>
</Card>
</div>
)
}