page.tsx23 lines · main
1import { ResetPasswordForm } from './reset-password-form';
2
3export const dynamic = 'force-dynamic';
4export const metadata = { title: 'auth · reset password' };
5
6/**
7 * Hosted password-reset request page. Tenant sends their email; Better Auth
8 * calls `sendResetPassword` (auth-mailer.ts) which emails a link to
9 * `/auth/<projectId>/new-password?token=<token>`.
10 *
11 * POST target: POST /api/v1/auth-tenant/request-password-reset
12 * { email: string; redirectTo: string }
13 * The `redirectTo` value (new-password page URL) is constructed client-side
14 * so it picks up the correct origin in dev and prod.
15 */
16export default async function ResetPasswordPage({
17 params,
18}: {
19 params: Promise<{ projectId: string }>;
20}) {
21 const { projectId } = await params;
22 return <ResetPasswordForm projectId={projectId} />;
23}