feat: add phone field to User model and update authentication flow
- Added phone field to User model in Prisma schema and generated types. - Updated backend authentication to include phone as an additional field. - Implemented phone input in the signup form with validation. - Created a new SignupPage component for user registration. - Updated routing to include signup path and redirect authenticated users. - Modified login page to reference Playzer and added link to signup.
This commit is contained in:
@@ -18,7 +18,7 @@ export const Route = createRootRouteWithContext<RouterContext>()({
|
||||
});
|
||||
|
||||
const AUTH_PAGE_REGEX =
|
||||
/^\/(login|select-complex|reset-password|onboard|invite|auth-callback)(?:\/|$)/;
|
||||
/^\/(login|signup|select-complex|reset-password|onboard|invite|auth-callback)(?:\/|$)/;
|
||||
|
||||
function RootRoute() {
|
||||
const location = useLocation();
|
||||
|
||||
11
apps/frontend/src/routes/signup.tsx
Normal file
11
apps/frontend/src/routes/signup.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { SignupPage } from '@/features/signup/signup-page';
|
||||
import { createFileRoute, redirect } from '@tanstack/react-router';
|
||||
|
||||
export const Route = createFileRoute('/signup')({
|
||||
beforeLoad: ({ context }) => {
|
||||
if (context.auth.isAuthenticated) {
|
||||
throw redirect({ to: '/' });
|
||||
}
|
||||
},
|
||||
component: SignupPage,
|
||||
});
|
||||
Reference in New Issue
Block a user