Fix SuperTokens to use separate ThirdParty and EmailPassword recipes
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user