PageSourceSearch

https://dashboard.morvo.co.uk/assets/Sso-CfeGZDCa.js

js morvo.co.uk collected 2026-09-24 09:52:57 UTC 2,311 bytes, 1 lines download raw bytes

1import{W as w,r as p,j as e,a9 as y,U as a}from"./index-CRQcHE7J.js";import{C as x}from"./card-DWLMxT6t.js";const b=()=>{const r=w(),[i,t]=p.useState(null);return p.useEffect(()=>{(async()=>{const s=new URLSearchParams(window.location.hash.substring(1)),o=new URLSearchParams(window.location.search),m=s.get("error")||o.get("error"),c=s.get("error_description")||o.get("error_description");if(m){t(c?.includes("expired")?"This sign-in link has expired. Reopen the Morvo dashboard from your Shopify admin.":c||"This sign-in link is invalid. Reopen the Morvo dashboard from your Shopify admin."),window.history.replaceState(null,"",window.location.pathname);return}const l=o.get("token_hash");if(l){const n=o.get("type")||"magiclink",{error:g}=await a.auth.verifyOtp({token_hash:l,type:n});if(window.history.replaceState(null,"",window.location.pathname),g){t("Could not complete sign-in. Reopen the Morvo dashboard from your Shopify admin.");return}r("/account",{replace:!0});return}const h=s.get("access_token")||o.get("access_token"),u=s.get("refresh_token")||o.get("refresh_token"),d=o.get("code");if(d){const{error:n}=await a.auth.exchangeCodeForSession(d);if(window.history.replaceState(null,"",window.location.pathname),n){t("Could not complete sign-in. Please try again from the Morvo app in Shopify.");return}r("/account",{replace:!0});return}if(h&&u){const{error:n}=await a.auth.setSession({access_token:h,refresh_token:u});if(window.history.replaceState(null,"",window.location.pathname),n){t("Could not complete sign-in. Please try again from the Morvo app in Shopify.");return}r("/account",{replace:!0});return}const{data:{session:f}}=await a.auth.getSession();if(f){r("/account",{replace:!0});return}t("This sign-in link is missing its token. Reopen the Morvo dashboard from your Shopify admin.")})()},[r]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-4",children:e.jsxs(x,{className:"w-full max-w-md p-8 text-center",children:[e.jsx("img",{src:y,alt:"Morvo",className:"h-10 mx-auto mb-6"}),i?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-xl font-semibold mb-2",children:"Sign-in link problem"}),e.jsx("p",{className:"text-muted-foreground",children:i})]}):e.jsx("p",{className:"text-muted-foreground",children:"Signing you in…"})]})})};export{b 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.