PageSourceSearch

https://snappilot.ai/assets/js/TikTokCallback-D529rKn-.js

js snappilot.ai collected 2026-10-05 12:39:29 UTC 1,529 bytes, 1 lines download raw bytes

1import{j as o}from"./ui-vendor-DeaCpvuz.js";import{u as p,r as d}from"./react-vendor-BwON9l4R.js";import{s as u,u as s}from"./index-Kz-5MvZ9.js";import"./supabase-vendor-eEOYocAC.js";import"./query-vendor-DsJQQYkK.js";const T=()=>{const e=p();return d.useEffect(()=>{(async()=>{const{data:{session:m}}=await u.auth.getSession();if(!m){s.error("Session expired. Please log in again."),e("/auth");return}const a=new URLSearchParams(window.location.search),n=a.get("code"),i=a.get("state"),l=a.get("error"),t=sessionStorage.getItem("oauth_return_path")||"/wizard/step1";if(sessionStorage.removeItem("oauth_return_path"),l==="access_denied"){e(t,{replace:!0});return}if(!n||!i){s.error("Missing OAuth parameters"),e(`${t}?error=tiktok`,{replace:!0});return}try{const{data:r,error:c}=await u.functions.invoke("tiktok-oauth-callback",{body:{code:n,state:i}});if(c)throw c;if(r?.error)throw new Error(r.error);sessionStorage.setItem("oauth_completed_at",Date.now().toString()),e(`${t}?connected=tiktok`,{replace:!0})}catch(r){console.error("TikTok callback error:",r),s.error("Failed to complete TikTok connection"),e(`${t}?error=tiktok`,{replace:!0})}})()},[e]),o.jsx("main",{className:"min-h-screen flex items-center justify-center bg-background text-foreground",children:o.jsxs("div",{className:"text-center space-y-2",children:[o.jsx("p",{className:"text-lg font-medium",children:"Completing TikTok connection…"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Please wait a moment."})]})})};export{T 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.