feat: Implement Convex authentication including sign-in/sign-up UI, Convex client provider, and backend auth functions.
This commit is contained in:
22
app/auth/page.tsx
Normal file
22
app/auth/page.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
|
||||
import { SignIn } from "@/components/auth/SignIn";
|
||||
import { Authenticated, Unauthenticated, useQuery } from "convex/react";
|
||||
import { api } from "@/convex/_generated/api";
|
||||
|
||||
export default function AuthPage() {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gray-50">
|
||||
<Unauthenticated>
|
||||
<SignIn />
|
||||
</Unauthenticated>
|
||||
<Authenticated>
|
||||
<div className="text-center">
|
||||
<h1 className="text-2xl font-bold mb-4">You are logged in!</h1>
|
||||
<p>Redirecting...</p>
|
||||
{/* You could add a redirect here or a button to go to dashboard */}
|
||||
</div>
|
||||
</Authenticated>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user