PageSourceSearch

https://music-prod.com/assets/useMagicLinkSessionFromHash-BMJuBkOE.js

js music-prod.com collected 2026-09-29 12:35:42 UTC 1,459 bytes, 1 lines download raw bytes

1import{r as e}from"./vendor-react-tIoPkRwd.js";import{s as t}from"./index--0ud_HHy.js";function a(){e.useEffect(()=>{(async()=>{const e=window.self!==window.top,a=async e=>{const a=new URLSearchParams(e.startsWith("#")?e.slice(1):e),s=a.get("access_token"),o=a.get("refresh_token"),n=a.get("type");if(s&&o&&(!n||["magiclink","recovery"].includes(n)))try{const{data:e,error:a}=await t.auth.setSession({access_token:s,refresh_token:o})}catch(r){}finally{try{window.history.replaceState({},document.title,window.location.pathname+window.location.search)}catch{}}},s=new URL(window.location.href),o=s.searchParams.get("code");if(o){try{const{data:e,error:a}=await t.auth.exchangeCodeForSession(o)}catch(r){}finally{try{s.searchParams.delete("code"),window.history.replaceState({},document.title,s.pathname+(s.searchParams.toString()?`?${s.searchParams.toString()}`:""))}catch{}}return}const n=window.location.hash;if(n)await a(n);else if(e)try{let e=!1;const t=s=>{const o=s.data,n=null==o?void 0:o.type,r=null==o?void 0:o.hash;"lovable-embed-auth-hash"!==n&&"lovable-auth-hash"!==n||"string"!=typeof r||!r.includes("access_token=")||(e=!0,window.removeEventListener("message",t),a(r))};window.addEventListener("message",t),window.parent.postMessage({type:"lovable-embed-request-auth-hash"},"*"),window.parent.postMessage({type:"lovable-request-auth-hash"},"*"),setTimeout(()=>{e||window.removeEventListener("message",t)},4e3)}catch(i){}})()},[])}export{a as u};

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.