PageSourceSearch

https://app.hacktron.ai/_nuxt/C24nDZzO.js

js hacktron.ai collected 2026-10-03 22:34:21 UTC 2,528 bytes, 1 lines download raw bytes

1import{_ as A}from"./mg-ljyKM.js";import{b5 as k,dN as $,dJ as C,dD as K,c6 as N,dy as O,e5 as R,a2 as Q,bV as w,ca as d,aV as g,cL as B,n as y,aQ as r,cC as a,b2 as E,aN as p,cm as T}from"./CN-9qKdY.js";import{a as z}from"./MBoq4tO8.js";import{g as D}from"./CKbSooN-.js";import{a as V}from"./D3d8bLcj.js";import"./kSt9p6IP.js";import"./9HPJhOPB.js";import"./PwVN_12q.js";import"./Cgg8Cm7b.js";import"./DP0aL2Fe.js";import"./i0M-8bu6.js";const G={class:"flex flex-col items-center justify-center h-screen gap-4"},L={class:"heading-heading-05"},j={class:"body-body-02 text-center max-w-md"},F={class:"heading-heading-05"},M={class:"body-body-02"},ae=k({__name:"callback",setup(x){const{query:{code:b,installation_id:f,state:S}}=$(),h=C(),i=K(),{reportOAuthFailure:v}=z(),n=D("github"),u=sessionStorage.getItem(n),I=p(()=>u||i.org?.organization?.slug||""),q=p(()=>u?i.orgs.find(e=>e.organization?.slug===u):i.org),m=p(()=>q.value?.organization?.id??""),_=T(!1);function c(e){return(Array.isArray(e)?e[0]:e)??""}return N(async()=>{const e=sessionStorage.getItem("oauth_state_github"),l=c(b),o=c(S);if(!!!(l&&o&&e&&e===o)){sessionStorage.removeItem("oauth_state_github"),sessionStorage.removeItem(n),_.value=!0;return}sessionStorage.removeItem("oauth_state_github");let s="error";try{const t=c(f);switch((await O().$apiClient.api.v1.github.installationIntents.post({code:l,installationId:t||void 0,state:o}))?.status){case"connected":s="installed";break;case"requested":s="requested";break;default:s="installing";break}h.invalidateQueries({queryKey:V.unified(m.value).queryKey}),h.invalidateQueries({queryKey:R.me(m.value).queryKey}),s!=="requested"&&sessionStorage.setItem(Q,"1")}catch(t){typeof t=="object"&&t!==null&&"responseStatusCode"in t&&t.responseStatusCode===409?s="error_connected_elsewhere":(v("github",t),console.error("Error recording GitHub install intent:",t))}finally{sessionStorage.removeItem(n)}await w({path:`/${I.value}/integrations`,query:{oauth_result:s,oauth_provider:"github"}})}),(e,l)=>{const o=A;return d(),g("div",G,[B(_)?(d(),g(y,{key:0},[r("h1",L,a(e.$t("integrations.oauth.bystander-title",{provider:e.$t("integrations.providers.github")})),1),r("p",j,a(e.$t("integrations.oauth.bystander-description")),1)],64)):(d(),g(y,{key:1},[E(o),r("h1",F,a(e.$t("integrations.oauth.processing-title",{provider:e.$t("integrations.providers.github")})),1),r("p",M,a(e.$t("integrations.oauth.processing-description-account",{provider:e.$t("integrations.providers.github")})),1)],64))])}}});export{ae as default};

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.