feat(auth): add password reset flow with OTP
- Add password-reset Prisma schema for OTP tracking - Add API contract schemas (start, verify, resend) - Add password-reset service with OTP validation and email sending - Add frontend reset-password page with 2-step flow - Add InputOTP component usage for OTP input - Add link to reset-password in login page - Remove link to About in login - Center and resize login/reset password forms
This commit is contained in:
15
apps/frontend/src/routes/reset-password.tsx
Normal file
15
apps/frontend/src/routes/reset-password.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ResetPasswordPage } from '@/features/password-reset/reset-password-page';
|
||||
import { createFileRoute, redirect } from '@tanstack/react-router';
|
||||
|
||||
export const Route = createFileRoute('/reset-password')({
|
||||
beforeLoad: ({ context }) => {
|
||||
if (context.auth.isAuthenticated) {
|
||||
throw redirect({ to: '/' });
|
||||
}
|
||||
},
|
||||
component: ResetPasswordRouteComponent,
|
||||
});
|
||||
|
||||
function ResetPasswordRouteComponent() {
|
||||
return <ResetPasswordPage />;
|
||||
}
|
||||
Reference in New Issue
Block a user