spb/groupe-ka Public
Groupe KA — site du holding + KA ID (compte unique & SSO des 7 plateformes). Next.js 16, SQLite, Google & Apple login.
TypeScript 93.9%
CSS 6%
1// Auteur : Simon-Pierre Boucher — contact@spboucher.ai2import type { Metadata } from "next";3import { redirect } from "next/navigation";4import { getSessionUser, safeNext } from "@/lib/auth";5import { SSO_CLIENTS } from "@/lib/sso";6import AuthForm from "./AuthForm";78export const metadata: Metadata = {9 title: "KA ID — connexion | Groupe KA",10 description:11 "Un seul compte pour toutes les plateformes du Groupe KA : créez votre KA ID ou continuez avec Google.",12};1314export default async function Connexion({15 searchParams,16}: {17 searchParams: Promise<{ next?: string; error?: string; via?: string }>;18}) {19 const sp = await searchParams;20 const next = safeNext(sp.next);2122 // Déjà connecté (et pas de retour SSO en attente) → profil.23 if (!sp.error) {24 const user = await getSessionUser();25 if (user) redirect(next);26 }2728 const viaLabel = sp.via ? (SSO_CLIENTS[sp.via]?.label ?? sp.via) : undefined;2930 return (31 <main className="mx-auto max-w-md px-4 pb-16 sm:px-6">32 <section className="pt-12 text-center sm:pt-14">33 <p className="kicker rise justify-center">34 KA ID · un compte, sept plateformes35 </p>36 <h1 className="gk-display rise mt-4 text-[clamp(30px,5vw,44px)] leading-[1] font-bold tracking-[-0.035em] uppercase [animation-delay:0.08s]">37 Un seul <span className="hl">·Ka</span> pour tout38 </h1>39 <p className="rise mt-4 text-[14px] text-ink-2 [animation-delay:0.16s]">40 Votre KA ID vous suit sur Lou·Ka, Immo·Ka, Vrai-Prix, ValoPlex,41 Auto·Ka, Fabri·Ka et Food·Ka. Même profil partout — c'est42 l'agrégation, appliquée à vous-même.43 </p>44 </section>45 <div className="rise mt-8 [animation-delay:0.22s]">46 <AuthForm next={next} error={sp.error} via={viaLabel} />47 </div>48 </main>49 );50}51