PageSourceSearch

https://cessna.org/_next/static/chunks/pages/oauth/authorize-fc44316c7b93898a.js

js cessna.org collected 2026-10-02 11:40:34 UTC 2,109 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2633],{46462:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/oauth/authorize",function(){return t(96970)}])},96970:(e,n,t)=>{"use strict";t.r(n),t.d(n,{__N_SSG:()=>l,default:()=>s});var i=t(37876),r=t(14232),o=t(89099),a=t(31777),l=!0;function s(){let e=(0,o.useRouter)(),[n,t]=(0,r.useState)(null),l=(0,a.d4)(e=>{var n,t,i;return(null==(t=e.auth)||null==(n=t.user)?void 0:n.data)||(null==(i=e.auth)?void 0:i.user)});return((0,r.useEffect)(()=>{if(!e.isReady)return;let{response_type:n,client_id:i,redirect_uri:r,state:o}=e.query;if("code"!==n)return void t("Unsupported response_type.");if(!i)return void t("Missing client_id.");if("https://wiki.cessna.org/Special:PluggableAuthLogin"!==r)return void t("Invalid redirect_uri.");if(!localStorage.getItem("token")){let n="/oauth/authorize?".concat(new URLSearchParams(e.query).toString());e.replace("/auth/login?redirect=".concat(encodeURIComponent(n)));return}let a=null==l?void 0:l.id,s=null==l?void 0:l.email,u=(null==l?void 0:l.username)||null,d=(null==l?void 0:l.name)||[null==l?void 0:l.first_name,null==l?void 0:l.last_name].filter(Boolean).join(" ")||u||(a?"User ".concat(a):null);if(!a||!s)return void t("User session data missing. Please log out and log in again.");fetch("/api/oauth/generate-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:i,redirectUri:r,userId:String(a),email:s,name:d,username:u})}).then(e=>e.json()).then(e=>{if(e.error)return void t(e.error);let n=new URLSearchParams({code:e.code});o&&n.set("state",o),window.location.href="".concat(r,"?").concat(n.toString())}).catch(()=>t("Authorization failed. Please try again."))},[e.isReady,e.query,l]),n)?(0,i.jsxs)("div",{style:{padding:"2rem",fontFamily:"sans-serif"},children:[(0,i.jsx)("h2",{children:"Authorization Error"}),(0,i.jsx)("p",{style:{color:"#c00"},children:n})]}):(0,i.jsx)("div",{style:{padding:"2rem",fontFamily:"sans-serif"},children:(0,i.jsx)("p",{children:"Authorizing, please wait…"})})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=46462)),_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.