Fix SuperTokens to use separate ThirdParty and EmailPassword recipes

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-16 16:07:27 -08:00
parent abddadce94
commit 0f8dbf8888
3 changed files with 29 additions and 38 deletions

View File

@@ -1,24 +1,12 @@
"use client";
import { useEffect, useState } from "react";
import { doesSessionExist } from "supertokens-web-js/recipe/thirdpartyemailpassword";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
export default function SuperTokensAuthComponent() {
const router = useRouter();
const [isLoading, setIsLoading] = useState(false);
useEffect(() => {
// Check if user is already logged in
doesSessionExist().then((exists) => {
if (exists) {
router.push("/marks-account/projects");
}
});
}, [router]);
const handleGoogleSignIn = async () => {
setIsLoading(true);
try {