// Auteur : Simon-Pierre Boucher — contact@spboucher.ai import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { getSessionUser, safeNext } from "@/lib/auth"; import { SSO_CLIENTS } from "@/lib/sso"; import AuthForm from "./AuthForm"; export const metadata: Metadata = { title: "KA ID — connexion | Groupe KA", description: "Un seul compte pour toutes les plateformes du Groupe KA : créez votre KA ID ou continuez avec Google.", }; export default async function Connexion({ searchParams, }: { searchParams: Promise<{ next?: string; error?: string; via?: string }>; }) { const sp = await searchParams; const next = safeNext(sp.next); // Déjà connecté (et pas de retour SSO en attente) → profil. if (!sp.error) { const user = await getSessionUser(); if (user) redirect(next); } const viaLabel = sp.via ? (SSO_CLIENTS[sp.via]?.label ?? sp.via) : undefined; return (

KA ID · un compte, sept plateformes

Un seul ·Ka pour tout

Votre KA ID vous suit sur Lou·Ka, Immo·Ka, Vrai-Prix, ValoPlex, Auto·Ka, Fabri·Ka et Food·Ka. Même profil partout — c'est l'agrégation, appliquée à vous-même.

); }