(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[905],{892:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/google/callback",function(){return s(8550)}])},8550:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var n=s(74848),a=s(96540),r=s(81924);let c=()=>{let[e,t]=(0,a.useState)("Processing authentication..."),[s,c]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{try{let e=window.location.hash.substring(1),s=new URLSearchParams(e),n=s.get("access_token"),a=s.get("expires_in");if(!n)throw Error("No access token found in the URL");await (0,r.ox)(n,a),t("Token stored successfully! You may close this window."),window.close()}catch(e){console.error("Error during authentication:",e),t("Authentication failed. Please try again."),c(!0)}})()},[]),(0,n.jsx)("div",{className:"min-h-screen flex justify-center items-center",children:(0,n.jsx)("p",{className:s?"text-red-600":"",children:e})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[636,593,792],()=>t(892)),_N_E=e.O()}]);