(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[154],{41924:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/google/auth",function(){return n(66485)}])},66485:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var o=n(74848),s=n(96540),i=n(86715),r=n(52798),a=n(77836);let u=()=>{let e=(0,i.useRouter)();return(0,s.useEffect)(()=>{let t=()=>{let e=window.location.origin,t=document.createElement("form");t.setAttribute("method","GET"),t.setAttribute("action","https://accounts.google.com/o/oauth2/v2/auth");let n={client_id:a.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID,redirect_uri:"".concat(e,"/google/callback"),scope:"https://www.googleapis.com/auth/spreadsheets",include_granted_scopes:"true",state:"pass-through value",response_type:"token"};for(let e in n)if(n.hasOwnProperty(e)){let o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("name",e),o.setAttribute("value",n[e]),t.appendChild(o)}document.body.appendChild(t),t.submit()};(async()=>{(await (0,r.RT)()).is_valid?e.push("/"):t()})()},[e]),(0,o.jsx)("div",{className:"min-h-screen flex justify-center items-center",children:(0,o.jsx)("p",{children:"Redirecting to Google for authentication..."})})}},86715:(e,t,n)=>{e.exports=n(88440)}},e=>{var t=t=>e(e.s=t);e.O(0,[636,593,792],()=>t(41924)),_N_E=e.O()}]);