1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{8312:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(1364)}])},1364:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return a}});var n=t(5893),r=t(1163),o=t(9818),l=t(7294);function a(){let[e,s]=(0,l.useState)(!1),[t,a]=(0,l.useState)(),{isReady:i,query:c}=(0,r.useRouter)(),[d,u]=(0,l.useState)();return(0,l.useEffect)(()=>{if(i){let e=c.token,t=c.idpToken,n=c.refreshToken;if(e)o.nk.SetAccessToken(null==e?void 0:e.toString()),n&&o.nk.SetRefreshToken(null==n?void 0:n.toString()),u(null==t?void 0:t.toString()),s(!0);else{let e="".concat("https://sandboxapi.ordercloud.io","/ocrplogin?id=").concat("google","&cid=").concat("7909f6ed-a1e5-4ffe-8145-366ebe00b7c9");console.log("Redirecting to: ",e),window.location.href=e}}},[i,c]),(0,l.useEffect)(()=>{let s=async()=>{a(await o.Me.Get())};e&&s()},[e]),t?(0,n.jsx)("main",{className:"flex items-center justify-center min-h-screen bg-gray-100",children:(0,n.jsxs)("div",{className:"w-full max-w-3xl p-8 bg-white shadow-lg rounded-lg",children:[(0,n.jsxs)("h2",{className:"text-3xl text-center mb-8",children:["Welcome"," ",(0,n.jsxs)("span",{className:"text-purple-600",children:["NOT_AVAILBLE"!==t.FirstName&&t.FirstName," ","NOT_AVAILABLE"!==t.LastName&&t.LastName]})]}),(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h3",{className:"text-xl font-semibold mb-2 text-purple-600",children:"OrderCloud User"}),(0,n.jsx)("pre",{className:"p-4 bg-gray-100 rounded-md overflow-auto",children:JSON.stringify(t,null,2)})]}),(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h3",{className:"text-xl font-semibold mb-2 text-purple-600",children:"OrderCloud Access Token"}),(0,n.jsx)("pre",{className:"p-4 bg-gray-100 rounded-md overflow-auto",children:o.nk.GetAccessToken()})]}),(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h3",{className:"text-xl font-semibold mb-2 text-purple-600",children:"OrderCloud Refresh Token"}),o.nk.GetRefreshToken()?(0,n.jsx)("pre",{className:"p-4 bg-gray-100 rounded-md overflow-auto",children:o.nk.GetRefreshToken()}):(0,n.jsx)("i",{children:"No refresh token found, to enable this make sure that your OrderCloud API Client has a RefreshTokenDuration set to a value greater than zero."})]}),(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h3",{className:"text-xl font-semibold mb-2 text-purple-600",children:"IDP Token"}),d?(0,n.jsx)("pre",{className:"p-4 bg-gray-100 rounded-md overflow-auto",children:d}):(0,n.jsx)("i",{children:'No IDP token found, to enable this make sure that the "Identity Provider Access Token" claim is enabled on your user flow application claims'})]})]})}):(0,n.jsx)("main",{children:"Loading..."})}o.VK.Set({baseApiUrl:"https://sandboxapi.ordercloud.io"})}},function(e){e.O(0,[708,143,888,774,179],function(){return e(e.s=8312)}),_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.