import{iC as i,iv as c,iF as u,i_ as p,gH as r,eN as h,fS as g,fH as f,bL as l}from"./strapi-ye6TfKul.js";const m=()=>{const s=i("/auth/login/:authResponse"),{formatMessage:o}=c(),e=u(),a=p(),t=r.useCallback(()=>{e({pathname:"/auth/oops",search:`?info=${encodeURIComponent(o({id:"Auth.form.button.login.providers.error",defaultMessage:"We cannot connect you through the selected provider."}))}`})},[e,o]);return r.useEffect(()=>{if(s?.params.authResponse==="error"&&t(),s?.params.authResponse==="success"){const n=h("jwtToken");n?(a(g({token:n})),e("/auth/login")):t()}},[a,s,t,e]),f.jsx(l.Loading,{})};export{m as AuthResponse};
