PageSourceSearch

https://xeenon.xyz/_next/static/chunks/pages/oauth2/token-1a774ec0c488301b.js

js xeenon.xyz collected 2026-09-24 10:41:58 UTC 7,639 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f0fc833f-b61c-4306-b829-b072e7ae07a6",e._sentryDebugIdIdentifier="sentry-dbid-f0fc833f-b61c-4306-b829-b072e7ae07a6")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3407],{45444:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/oauth2/token",function(){return n(7191)}])},7191:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>k});var r=n(31085),i=n(31242),s=n(91277),a=n(42573),o=n(84425),l=n(98768),d=n(6479),c=n(87020),u=n(67173),x=n(50477),h=n(30211),g=n(93264),y=n(37454),p=n(56101),f=n(17076),b=n(88184),m=n(34747),j=n.n(m),w=n(35223),z=n(68256),v=n(26712);let S=()=>{var e;let t=(0,i.useRouter)(),{user:n,login:m,logout:S}=(0,b.A)(),{redirect_uri:k}=t.query,{data:_,error:T,isLoading:E}=(0,w.I)({queryKey:["oauth2-apps",null==n?void 0:n._id,t.query],enabled:!!(null==n?void 0:n._id),retry:!1,queryFn:async()=>{let e=await f.A.oauth2.validate.$get({query:t.query}),n=await (0,f.u)(e);if(n)throw n;let r=await e.json();if("error"in r)throw Error(r.error);return r}}),{mutate:A,isPending:C}=(0,z.n)({mutationFn:async()=>{let e=await f.A.oauth2.authorize.$post({query:t.query}),n=await (0,f.u)(e);if(n)throw n;let r=await e.json();if("error"in r)throw Error(r.error);return r},onSuccess:e=>{(0,v.oR)({type:"success",title:"Authorization successful",content:"You are now authorized to use this application"}),t.push(e.location)},onError:e=>{(0,v.oR)({type:"error",title:"Failed to authorize application",content:e.message})}}),I=()=>{if(!k){t.push("/");return}let e=new URL(k);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","User denied authorization"),window.location.href=e.toString()};return T?(0,r.jsx)(s.o,{h:"100%",p:4,children:(0,r.jsxs)(a.F,{status:"warning",maxW:"md",bg:"white",borderRadius:"xl",shadow:"2xl",backdropFilter:"blur(10px)",border:"1px solid",borderColor:"red.200",p:6,children:[(0,r.jsx)(o._,{}),(0,r.jsxs)(l.T,{w:"100%",children:[(0,r.jsx)(d.E,{color:"orange.500",children:null==T?void 0:T.message}),(0,r.jsx)(j(),{href:"/",children:(0,r.jsx)(c.$,{variant:"link",size:"sm",children:"Go to Xeenon"})})]})]})}):E?(0,r.jsx)(s.o,{h:"100%",p:4,children:(0,r.jsx)(u.a,{bg:"white",p:8,borderRadius:"xl",shadow:"2xl",maxW:"md",w:"full",position:"relative",backdropFilter:"blur(10px)",border:"1px solid",borderColor:"gray.200",children:(0,r.jsx)(u.a,{position:"absolute",top:0,left:0,right:0,bottom:0,bg:"rgba(255, 255, 255, 0.9)",borderRadius:"xl",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,children:(0,r.jsx)(x.y,{size:"lg",color:"purple.500"})})})}):n?(0,r.jsx)(s.o,{h:"100%",p:4,"data-sentry-element":"Center","data-sentry-component":"AuthorizePage","data-sentry-source-file":"index.tsx",children:(0,r.jsx)(u.a,{bg:"white",p:8,borderRadius:"xl",shadow:"2xl",maxW:"md",w:"full",position:"relative",backdropFilter:"blur(10px)",border:"1px solid",borderColor:"gray.200","data-sentry-element":"Box","data-sentry-source-file":"index.tsx",children:(0,r.jsxs)(l.T,{spacing:6,align:"stretch","data-sentry-element":"VStack","data-sentry-source-file":"index.tsx",children:[(0,r.jsxs)(l.T,{spacing:4,"data-sentry-element":"VStack","data-sentry-source-file":"index.tsx",children:[(0,r.jsx)(g._,{src:null!==(e=null==_?void 0:_.client.url)&&void 0!==e?e:"/logo.png",alt:"".concat(null==_?void 0:_.client.name," icon"),w:16,h:16,borderRadius:"md","data-sentry-element":"Image","data-sentry-source-file":"index.tsx"}),(0,r.jsx)(h.D,{size:"md",textAlign:"center",color:"gray.800","data-sentry-element":"Heading","data-sentry-source-file":"index.tsx",children:"Authorize Application"}),(0,r.jsx)(d.E,{fontSize:"lg",fontWeight:"semibold",textAlign:"center",color:"gray.700","data-sentry-element":"Text","data-sentry-source-file":"index.tsx",children:null==_?void 0:_.client.name}),(0,r.jsx)(d.E,{fontSize:"sm",textAlign:"center",color:"gray.600","data-sentry-element":"Text","data-sentry-source-file":"index.tsx",children:null==_?void 0:_.client.de
1scription})]}),!!(null==_?void 0:_.scopes.length)&&(0,r.jsxs)(l.T,{align:"stretch",spacing:3,children:[(0,r.jsx)(d.E,{fontSize:"sm",fontWeight:"semibold",color:"gray.700",children:"This application is requesting access to:"}),(0,r.jsx)(l.T,{align:"stretch",spacing:2,children:null==_?void 0:_.scopes.map(e=>(0,r.jsxs)(y.z,{spacing:3,children:[(0,r.jsx)(p.E,{colorScheme:"purple",variant:"subtle",fontSize:"xs",children:e.name}),(0,r.jsx)(d.E,{fontSize:"sm",color:"gray.600",children:e.description})]},e.name))})]}),(0,r.jsxs)(l.T,{spacing:3,"data-sentry-element":"VStack","data-sentry-source-file":"index.tsx",children:[(0,r.jsx)(c.$,{onClick:()=>A(),variant:"outline",size:"lg",width:"full",isDisabled:C,"data-sentry-element":"Button","data-sentry-source-file":"index.tsx",children:"Authorize"}),(0,r.jsx)(c.$,{onClick:I,variant:"link",size:"lg",width:"full",isDisabled:C,"data-sentry-element":"Button","data-sentry-source-file":"index.tsx",children:"Deny"})]}),(0,r.jsx)(d.E,{fontSize:"xs",textAlign:"center",color:"gray.500","data-sentry-element":"Text","data-sentry-source-file":"index.tsx",children:"By authorizing, you allow this application to access your Xeenon account according to the permissions listed above."}),(0,r.jsx)(u.a,{pt:4,mt:4,borderTop:"1px solid",borderColor:"gray.200","data-sentry-element":"Box","data-sentry-source-file":"index.tsx",children:(0,r.jsxs)(y.z,{justify:"space-between",align:"center","data-sentry-element":"HStack","data-sentry-source-file":"index.tsx",children:[(0,r.jsxs)(l.T,{align:"start",spacing:0,"data-sentry-element":"VStack","data-sentry-source-file":"index.tsx",children:[(0,r.jsx)(d.E,{fontSize:"xs",color:"gray.600","data-sentry-element":"Text","data-sentry-source-file":"index.tsx",children:"Signed in as"}),(0,r.jsx)(d.E,{fontSize:"sm",fontWeight:"semibold",color:"gray.800","data-sentry-element":"Text","data-sentry-source-file":"index.tsx",children:(null==n?void 0:n.displayName)||(null==n?void 0:n.email)||"User"})]}),(0,r.jsx)(c.$,{variant:"ghost",size:"sm",onClick:S,color:"gray.600",_hover:{color:"gray.800"},"data-sentry-element":"Button","data-sentry-source-file":"index.tsx",children:"Sign Out"})]})})]})})}):(0,r.jsx)(s.o,{h:"100%",p:4,children:(0,r.jsx)(u.a,{bg:"white",p:8,borderRadius:"xl",shadow:"2xl",maxW:"md",w:"full",position:"relative",backdropFilter:"blur(10px)",border:"1px solid",borderColor:"gray.200",children:(0,r.jsxs)(l.T,{spacing:6,align:"stretch",children:[(0,r.jsxs)(l.T,{spacing:4,children:[(0,r.jsx)(h.D,{size:"lg",textAlign:"center",color:"gray.800",children:"Sign In Required"}),(0,r.jsx)(d.E,{fontSize:"sm",textAlign:"center",color:"gray.600",children:"You need to sign in to authorize this application"})]}),(0,r.jsxs)(l.T,{spacing:3,children:[(0,r.jsx)(c.$,{variant:"outline",size:"lg",width:"full",onClick:m,children:"Sign In"}),(0,r.jsx)(c.$,{variant:"link",size:"lg",width:"full",onClick:I,children:"Cancel"})]}),(0,r.jsx)(d.E,{fontSize:"xs",textAlign:"center",color:"gray.500",children:"Sign in to your Xeenon account to continue with the authorization process."})]})})})};S.getLayout=e=>(0,r.jsx)(u.a,{as:"main",w:"100vw",h:"100vh",bgImage:"url(https://assets.graviton.xyz/xeenon-public-media/bg-3-compressed.png)",bgRepeat:"no-repeat",bgSize:"cover",bgPosition:"center","data-sentry-element":"Box","data-sentry-component":"Layout","data-sentry-source-file":"index.tsx",children:e});let k=S}},e=>{var t=t=>e(e.s=t);e.O(0,[636,6593,8792],()=>t(45444)),_N_E=e.O()}]);

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.