PageSourceSearch

https://sortir.eu/assets/AuthConfirm-Dk_RvcOG.js

js sortir.eu collected 2026-10-02 11:14:26 UTC 2,329 bytes, 1 lines download raw bytes

1import{r as c,j as e}from"./vendor-react-De19kUq8.js";import{g as x,c as p}from"./vendor-app-DH33cvx6.js";import{s as f,a0 as n,L as h,B as v}from"./index-BNqnZmmX.js";import{C as g}from"./circle-check-BCiAQQzZ.js";import{C as j}from"./circle-x-DlbzMUre.js";import"./vendor-ui-pO556hdz.js";import"./vendor-supabase-Bm92Y2YK.js";function R(){const[o]=x(),s=p(),[t,a]=c.useState("verifying"),[d,u]=c.useState(""),i=o.get("token_hash")||"",r=o.get("type")||"signup";return c.useEffect(()=>{if(!i){a("error"),u("Lien invalide — aucun token trouvé.");return}let m=!1;return(async()=>{const{error:l}=await f.auth.verifyOtp({token_hash:i,type:r});if(!m){if(l){if(r==="recovery"){n.error("Ce lien a expiré ou a déjà été utilisé. Demandez un nouveau lien."),s("/auth/reset-password",{replace:!0,state:{mode:"request"}});return}a("error"),u(l.message||"La vérification a échoué.");return}a("success"),r==="recovery"?(n.success("Identité confirmée — choisissez votre nouveau mot de passe."),s("/auth/reset-password",{replace:!0,state:{mode:"update"}})):(n.success("Adresse email confirmée ! Bienvenue sur Sortir."),s("/",{replace:!0}))}})(),()=>{m=!0}},[i,r,s]),e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:e.jsxs("div",{className:"w-full max-w-sm text-center space-y-6",children:[e.jsxs("div",{className:"text-3xl font-bold tracking-widest text-primary",children:["SORT",e.jsx("span",{className:"text-accent",children:"!"}),"R"]}),t==="verifying"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx(h,{className:"h-10 w-10 mx-auto animate-spin text-primary"}),e.jsx("p",{className:"text-muted-foreground",children:"Vérification en cours…"})]}),t==="success"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{className:"h-10 w-10 mx-auto text-green-600"}),e.jsx("p",{className:"text-foreground font-medium",children:"Email confirmé ! Redirection…"})]}),t==="error"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{className:"h-10 w-10 mx-auto text-destructive"}),e.jsx("p",{className:"text-foreground font-medium",children:"Échec de la vérification"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e.jsx(v,{variant:"outline",onClick:()=>s("/auth",{replace:!0}),children:"Retour à la connexion"})]})]})})}export{R as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.