import { hasPasskeysForLogin } from "@/app/auth-actions"; import { getSession } from "@/lib/auth"; import { redirect } from "next/navigation"; import AuthForm from "./auth-form"; type SearchParams = { next?: string }; export default async function AuthPage({ searchParams, }: { searchParams: Promise; }) { const session = await getSession(); if (session) { const dest = (await searchParams).next ?? "/"; redirect(dest); } const passkeysAvailable = await hasPasskeysForLogin(); const next = (await searchParams).next ?? "/"; return ; } export const dynamic = "force-dynamic";