PageSourceSearch

https://www.scientificamerican.com/static/entry/institutional-access.SX8g16bi.js

js scientificamerican.com collected 2026-09-24 07:36:56 UTC 4,837 bytes, 13 lines download raw bytes

1import{j as e,r as i}from"../chunks/vendor-react-DdEP1kCQ.js";import{D as A}from"../chunks/DefaultLayout-B4mESSua.js";import{a as g}from"../chunks/vendor-shared-ShLQKC4n.js";import{u as P,b as v}from"../chunks/core-Bpuic6mr.js";import{L}from"../chunks/Header-tkY3LBrW.js";import"../chunks/chunk-Cgl-0otj.js";import{b as _}from"../chunks/static.module-CAsgwhYU.js";import"../chunks/Header-DuP3RNUx.js";import"../chunks/sciam-B_IQ-Vo8.js";import"../chunks/sciam-CvuG93yt.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new t.Error().stack;c&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[c]="b5d8f1d7-0883-47c8-a414-33b492bea2a8",t._sentryDebugIdIdentifier="sentry-dbid-b5d8f1d7-0883-47c8-a414-33b492bea2a8")}catch{}})();const $="container-3k4pJ",F="helper-SqoH9",U="buttonRow-tdZXp",k="button-zBqLD baseBtn-ZNLef smallBtn-ebGz- baseBtn-ZNLef darkGrayBtn-p1Ce6",H="issueButton-P5W5U baseBtn-ZNLef smallBtn-ebGz- baseBtn-ZNLef blue3Btn-bZbVn",s={container:$,helper:F,buttonRow:U,button:k,issueButton:H};function O(){const{hasAccess:t,hasInstitutionalAccess:c,hasUnlimitedAccess:b}=v(),[u,I]=i.useState([]),[p,y]=i.useState(""),[h,w]=i.useState(""),[m,N]=i.useState("loading"),[l,S]=i.useState({}),[f,D]=i.useState(null),[B,x]=i.useState(!1),j=["idp_details","_pc_instaccess","idp_magic","ezproxy_bpid"];i.useEffect(()=>{const r=new Date;y(r.toString()),w(r.toISOString());let a=sessionStorage.getItem("idp_trace_id");a||(a=crypto.randomUUID(),sessionStorage.setItem("idp_trace_id",a)),D(a);const n=setInterval(()=>{const o=j.map(d=>{let T=g.get(d)||null;return`${d}=${T}`});u.join(",")!==o.join(",")&&I(o)},1e3);return fetch("/api/user-info/",{headers:{Accept:"application/json"}}).then(o=>o.json().then(d=>{N(d.ipAddress),S(d)})),()=>{clearInterval(n)}},[]);const C=()=>{const r=Object.entries(l).filter(([n])=>n!=="ipAddress").map(([n,o])=>`  ${n}: ${o}`).join(`
2`),a=`Scientific American Institutional Access Diagnostics
3
4Trace ID: ${f}
5CDN User IP: ${m}
6IP Headers:
7${r}
8Access (General): ${JSON.stringify(t)}
9Access (IDP): ${JSON.stringify(c)}
10State:
11${j.map(n=>`  ${n}: ${g.get(n)||null}`).join(`
12`)}
13Timestamp: ${p} (UTC: ${h})`;navigator.clipboard.writeText(a).then(()=>{x(!0),setTimeout(()=>x(!1),2e3)})};return e.jsx("div",{className:s.container,children:e.jsxs("aside",{className:s.helper,children:[e.jsx("h2",{children:"Diagnostic information:"}),e.jsx("p",{children:"If you're having trouble with your institutional access, please share the following:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"CDN User IP"}),": ",e.jsx("code",{children:m})]}),l.fastlyClientIP&&e.jsxs("li",{children:[e.jsx("strong",{children:"Fastly Client IP"}),": ",e.jsx("code",{children:l.fastlyClientIP})]}),l.xForwardedFor&&e.jsxs("li",{children:[e.jsx("strong",{children:"X-Forwarded-For"}),": ",e.jsx("code",{children:l.xForwardedFor})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"access/general"}),": ",e.jsx("code",{children:JSON.stringify(t)})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"access/idp"}),": ",e.jsx("code",{children:JSON.stringify(c)})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"state:"}),e.jsx("ul",{children:u.map(r=>e.jsx("li",{children:e.jsx("code",{children:r})},r))})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Support Trace ID"}),": ",e.jsx("code",{children:f})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Timestamp:"})," ",p,". ",e.jsx("strong",{children:"UTC:"})," ",e.jsx("code",{children:h})]})]}),e.jsx("br",{}),e.jsx("button",{onClick:C,className:s.button,children:B?"Copied to Clipboard!":"Copy Diagnostic Info"})]})})}function Z(){const{showSupportData:t}=P();return e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Institutional Access"}),e.jsxs("div",{className:s.container,children:[e.jsx("div",{className:_.staticPageBodyCopy,children:e.jsx("p",{children:"Welcome to the Institutional Access Homepage."})}),e.jsxs("div",{className:s.buttonRow,children:[e.jsx("a",{className:s.issueButton,href:"/latest-issue/",children:"Latest Issue"}),e.jsx("a",{className:s.issueButton,href:"/archive/issues/",children:"Magazine Archives"}),e.jsx("a",{className:s.issueButton,href:"/ebooks/",children:"eBooks"}),e.jsx("a",{className:s.button,href:"https://www.springernature.com/gp/librarians/licensing",children:"Springer Nature Licensing"}),e.jsx("a",{className:s.button,href:"https://idp.springernature.com/login/adminportal?redirect_uri=https%3A%2F%2Flibrarian.springernature.com%2F",children:"Librarian Portal"}),e.jsx("a",{className:s.button,href:"https://www.scientificamerican.com/page/frequently-asked-questions/institutional-license/",children:"FAQ"})]})]}),t&&e.jsx(O,{})]})}function V(){return e.jsx(A,{children:e.jsx(Z,{})})}
13export{V 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.