+
+
Log in
+
+ Enter your credentials to access your account
+
+
+
+
+
+
+
+ Don't have an account?{" "}
+
+ Sign up here
+
+
+
+
+
+
+
+
+
+
+ Or continue with
+
+
+
+
+
+
+ >
+ );
+}
diff --git a/apps/console/src/pages/RegisterPage.tsx b/apps/console/src/pages/RegisterPage.tsx
new file mode 100644
index 000000000..2dbc2f677
--- /dev/null
+++ b/apps/console/src/pages/RegisterPage.tsx
@@ -0,0 +1,155 @@
+import { useState } from "react";
+import { Link, useNavigate } from "react-router";
+import { Helmet } from "react-helmet-async";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { buildEndpoint } from "@/utils";
+import { useToast } from "@/hooks/use-toast";
+import { useAuth } from "@/contexts/AuthContext";
+
+export default function RegisterPage() {
+ const [email, setEmail] = useState("");
+ const [password, setPassword] = useState("");
+ const [isLoading, setIsLoading] = useState(false);
+ const { toast } = useToast();
+ const navigate = useNavigate();
+ const { checkAuth } = useAuth();
+
+ const handleSubmit = async (e: React.FormEvent) => {
+ e.preventDefault();
+
+ if (!email || !password) {
+ toast({
+ title: "Error",
+ description: "Email and password are required",
+ variant: "destructive",
+ });
+ return;
+ }
+
+ setIsLoading(true);
+
+ try {
+ const response = await fetch(buildEndpoint("/console/v1/auth/register"), {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ credentials: "include",
+ body: JSON.stringify({ email, password }),
+ });
+
+ if (!response.ok) {
+ const errorData = await response.json().catch(() => ({}));
+ throw new Error(errorData.message || "Registration failed");
+ }
+
+ toast({
+ title: "Success",
+ description: "Account created successfully",
+ });
+
+ // Check authentication status after registration
+ await checkAuth();
+
+ // Redirect to home page after successful registration
+ navigate("/");
+ } catch (error) {
+ toast({
+ title: "Error",
+ description:
+ error instanceof Error ? error.message : "Registration failed",
+ variant: "destructive",
+ });
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ return (
+ <>
+
+
+
Sign up
+
+ Enter your information to create an account
+
+
+
+
+
+
+
+ Already have an account?{" "}
+
+ Log in here
+
+
+
+
+
+
+
+
+
+
+ Or continue with
+
+
+
+
+
+
+ >
+ );
+}
diff --git a/apps/console/src/pages/__generated__/CreatePeoplePageQuery.graphql.ts b/apps/console/src/pages/__generated__/CreatePeoplePageQuery.graphql.ts
index b1d14ee8c..bb64ad454 100644
--- a/apps/console/src/pages/__generated__/CreatePeoplePageQuery.graphql.ts
+++ b/apps/console/src/pages/__generated__/CreatePeoplePageQuery.graphql.ts
@@ -1,5 +1,5 @@
/**
- * @generated SignedSource<<25866c1f4e6fb640f91b8d05651df9f4>>
+ * @generated SignedSource<