PageSourceSearch

https://official-web-asset.tappytoon.com/_next/static/chunks/pages/oauth/twitter/callback-35c56fe60f6021fa.js

js tappytoon.com collected 2026-09-24 09:30:34 UTC 2,559 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4960],{62280:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oauth/twitter/callback",function(){return i(25919)}])},25919:function(e,t,i){"use strict";i.r(t);var r=i(43653),a=i.n(r),n=i(40772),o=i(4112),u=i(17765),l=i(5956),c=i(12676),s=i(93583),d=i(44279);let h=n.yI.TWITTER,v={redirect_uri:"/"},exchangeRequestTokenForAccessToken=async(e,t)=>{let i=(0,u.d)("/api/third-parties/twitter/access-token"),{data:r}=await a().get(i,{params:t});return r},Page=()=>null;Page.getInitialProps=async e=>{let{req:t,res:i,query:r,isServer:a,store:u}=e;if(!a)return window.location.replace("/");let{oauth_token:p,oauth_verifier:g}=r,{token:k,secret:w,state:_}=await s.Z.getTokenCookie(t,"oauth1-twitter"),f=null!=_?_:v;if(p!==k)return i.redirect("/");let{oauth_token:T,oauth_token_secret:P,screen_name:m}=await exchangeRequestTokenForAccessToken(e,{key:k,secret:w,verifier:g}),R=n.oauth2Spec.authorizeBySocial({provider:h,accessToken:T,accessTokenSecret:P,allowDuplicateEmail:"true"===f.allowDuplicateEmail}),y=(0,d.D)(f.redirect_uri,"/");try{let e=await u.axios.request(R);(0,l.wT)(t,i,{...e.data,continuousLoginUsername:m,grantType:n.Nf.SOCIAL,throughRegistration:(0,o.M4j)({response:e})}),i.redirect(y)}catch(t){let e=(0,c.Q)({error:t,provider:h,state:f,safeRedirectUri:y});if(e)return i.redirect(e);throw t}},t.default=Page},12676:function(e,t,i){"use strict";i.d(t,{Q:function(){return buildDuplicateAccountRedirectPath}});var r=i(40772);let getReturnPath=e=>(null==e?void 0:e.duplicateReturnPath)==="register"?"/register":"/login",buildDuplicateAccountRedirectPath=e=>{var t,i,a,n,o,u,l;let{error:c,provider:s,state:d,safeRedirectUri:h}=e,v=null===(t=c.response)||void 0===t?void 0:t.status,p=null===(i=c.response)||void 0===i?void 0:i.data;if(!(0,r.hI)(v,null==p?void 0:p.code))return null;let g=new URLSearchParams({duplicate:"1",attempted:s,registered:null!==(u=null==p?void 0:null===(n=p.metadata)||void 0===n?void 0:null===(a=n.existingProviders)||void 0===a?void 0:a[0])&&void 0!==u?u:"",email:null!==(l=null==p?void 0:null===(o=p.metadata)||void 0===o?void 0:o.email)&&void 0!==l?l:"",redirect_uri:h});return"".concat(getReturnPath(d),"?").concat(g.toString())}},93583:function(e,t,i){"use strict";var r=i(58684),a=i(88674);t.Z={setTokenCookie:(e,t,i,n)=>{r.Z.setCookie(t,i,n,{httpOnly:!0,maxAge:60,domain:(0,a.yT)(e),secure:(0,a.ZF)(),sameSite:"Lax",path:"/"})},getTokenCookie:(e,t)=>r.Z.getCookie(e,t)}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=62280)}),_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.