(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25155],{37502:function(i,e,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reference/nextjs/react",function(){return s(81016)}])},81016:function(i,e,s){"use strict";s.r(e),s.d(e,{useTOC:function(){return a}});var n=s(651),h=s(64211),d=s(1089),l=s(15593),t=s(74481),r=s(21769);function a(i){let e={del:"del",...(0,l.a)()};return[{value:"GetSessionParams",id:"getsessionparams",depth:2},{value:"Properties",id:"properties",depth:3},{value:"broadcast?",id:"broadcast",depth:4},{value:"event?",id:"event",depth:4},{value:"triggerEvent?",id:"triggerevent",depth:4},{value:"SessionProviderProps",id:"sessionproviderprops",depth:2},{value:"Properties",id:"properties-1",depth:3},{value:"basePath?",id:"basepath",depth:4},{value:"baseUrl?",id:"baseurl",depth:4},{value:"children",id:"children",depth:4},{value:"refetchInterval?",id:"refetchinterval",depth:4},{value:"refetchOnWindowFocus?",id:"refetchonwindowfocus",depth:4},{value:"refetchWhenOffline?",id:"refetchwhenoffline",depth:4},{value:"session?",id:"session",depth:4},{value:"SignInOptions",id:"signinoptions",depth:2},{value:"Extends",id:"extends",depth:3},{value:"Properties",id:"properties-2",depth:3},{value:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.del,{children:"callbackUrl?"})}),id:"callbackurl",depth:4},{value:"Deprecated",id:"deprecated",depth:5},{value:"redirect?",id:"redirect",depth:4},{value:"redirectTo?",id:"redirectto",depth:4},{value:"SignInResponse",id:"signinresponse",depth:2},{value:"Properties",id:"properties-3",depth:3},{value:"code",id:"code",depth:4},{value:"error",id:"error",depth:4},{value:"ok",id:"ok",depth:4},{value:"status",id:"status",depth:4},{value:"url",id:"url",depth:4},{value:"SignOutParams<R>",id:"signoutparamsr",depth:2},{value:"Type parameters",id:"type-parameters",depth:3},{value:"Properties",id:"properties-4",depth:3},{value:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.del,{children:"callbackUrl?"})}),id:"callbackurl-1",depth:4},{value:"Deprecated",id:"deprecated-1",depth:5},{value:"redirect?",id:"redirect-1",depth:4},{value:"redirectTo?",id:"redirectto-1",depth:4},{value:"LiteralUnion<T, U>",id:"literaluniont-u",depth:2},{value:"Type parameters",id:"type-parameters-1",depth:3},{value:"SessionContextValue<R>",id:"sessioncontextvaluer",depth:2},{value:"Type parameters",id:"type-parameters-2",depth:3},{value:"UpdateSession()",id:"updatesession",depth:2},{value:"Todo",id:"todo",depth:3},{value:"Parameters",id:"parameters",depth:3},{value:"Returns",id:"returns",depth:3},{value:"SessionContext",id:"sessioncontext",depth:2},{value:"__NEXTAUTH",id:"__nextauth",depth:2},{value:"SessionProvider()",id:"sessionprovider",depth:2},{value:"Parameters",id:"parameters-1",depth:3},{value:"Returns",id:"returns-1",depth:3},{value:"getCsrfToken()",id:"getcsrftoken",depth:2},{value:"Returns",id:"returns-2",depth:3},{value:"getProviders()",id:"getproviders",depth:2},{value:"Returns",id:"returns-3",depth:3},{value:"getSession()",id:"getsession",depth:2},{value:"Parameters",id:"parameters-2",depth:3},{value:"Returns",id:"returns-4",depth:3},{value:"signIn()",id:"signin",depth:2},{value:"Type parameters",id:"type-parameters-3",depth:3},{value:"Parameters",id:"parameters-3",depth:3},{value:"Returns",id:"returns-5",depth:3},{value:"signOut()",id:"signout",depth:2},{value:"Type parameters",id:"type-parameters-4",depth:3},{value:"Parameters",id:"parameters-4",depth:3},{value:"Returns",id:"returns-6",depth:3},{value:"useSession()",id:"usesession",depth:2},{value:"Type parameters",id:"type-parameters-5",depth:3},{value:"Parameters",id:"parameters-5",depth:3},{value:"Returns",id:"returns-7",depth:3}]}e.default=(0,h.c)(function(i){let{toc:e=a(i)}=i,s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",hr:"hr",li:"li",p:"p",pre:"pre",span:"span",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.a)(),...i.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"react"}),"\n",(0,n.jsxs)(s.p,{children:["NextAuth.js is the official integration of Auth.js for Next.js applications. It supports both\n",(0,n.jsx)(s.a,{href:"https://nextjs.org/docs/app/building-your-application/rendering/client-components",children:"Client Components"})," and the\n",(0,n.jsx)(s.a,{href:"https://nextjs.org/docs/pages",children:"Pages Router"}),". It includes methods for signing in, signing out, hooks, and a React\nContext provider to wrap your application and make session data available anywhere."]}),"\n",(0,n.jsxs)(s.p,{children:["For use in ",(0,n.jsx)(s.a,{href:"https://nextjs.org/docs/app/api-reference/functions/server-actions",children:"Server Actions"}),", check out ",(0,n.jsx)(s.a,{href:"https://authjs.dev/guides/upgrade-to-v5#methods",children:"these methods"})]}),"\n",(0,n.jsx)(s.h2,{id:e[0].id,children:e[0].value}),"\n",(0,n.jsx)(s.h3,{id:e[1].id,children:e[1].value}),"\n",(0,n.jsx)(s.h4,{id:e[2].id,children:e[2].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"broadcast"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,n.jsx)(s.h4,{id:e[3].id,children:e[3].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"event"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,n.jsx)(s.h4,{id:e[4].id,children:e[4].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"triggerEvent"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[5].id,children:e[5].value}),"\n",(0,n.jsx)(s.p,{children:"If you have session expiry times of 30 days (the default) or more, then you probably don’t need to change any of the default options."}),"\n",(0,n.jsxs)(s.p,{children:["However, if you need to customize the session behavior and/or are using short session expiry times, you can pass options to the provider to customize the behavior of the ",(0,n.jsx)(s.a,{href:"react#usesession",children:"useSession"})," hook."]}),"\n",(0,n.jsx)(s.h3,{id:e[6].id,children:e[6].value}),"\n",(0,n.jsx)(s.h4,{id:e[7].id,children:e[7].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"basePath"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,n.jsx)(s.h4,{id:e[8].id,children:e[8].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"baseUrl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,n.jsx)(s.h4,{id:e[9].id,children:e[9].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"children"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ReactNode;"})]})})}),"\n",(0,n.jsx)(s.h4,{id:e[10].id,children:e[10].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"refetchInterval"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": number;"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["A time interval (in seconds) after which the session will be re-fetched.\nIf set to ",(0,n.jsx)(s.code,{children:"0"})," (default), the session is not polled."]}),"\n",(0,n.jsx)(s.h4,{id:e[11].id,children:e[11].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"refetchOnWindowFocus"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.code,{children:"SessionProvider"})," automatically refetches the session when the user switches between windows.\nThis option activates this behaviour if set to ",(0,n.jsx)(s.code,{children:"true"})," (default)."]}),"\n",(0,n.jsx)(s.h4,{id:e[12].id,children:e[12].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"refetchWhenOffline"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"false"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["Set to ",(0,n.jsx)(s.code,{children:"false"})," to stop polling when the device has no internet access offline (determined by ",(0,n.jsx)(s.code,{children:"navigator.onLine"}),")"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsxs)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine",children:[(0,n.jsx)(s.code,{children:"navigator.onLine"})," documentation"]})}),"\n",(0,n.jsx)(s.h4,{id:e[13].id,children:e[13].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"session"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Session;"})]})})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[14].id,children:e[14].value}),"\n",(0,n.jsx)(s.h3,{id:e[15].id,children:e[15].value}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type",children:(0,n.jsx)(s.code,{children:"Record"})}),"<",(0,n.jsx)(s.code,{children:"string"}),", ",(0,n.jsx)(s.code,{children:"unknown"}),">"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:e[16].id,children:e[16].value}),"\n",(0,n.jsx)(s.h4,{id:e[17].id,children:e[17].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"callbackUrl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,n.jsx)(s.h5,{id:e[18].id,children:e[18].value}),"\n",(0,n.jsxs)(s.p,{children:["Use ",(0,n.jsx)(s.code,{children:"redirectTo"})," instead."]}),"\n",(0,n.jsx)(s.h4,{id:e[19].id,children:e[19].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"redirect"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,n.jsx)(s.p,{children:"You might want to deal with the signin response on the same page, instead of redirecting to another page.\nFor example, if an error occurs (like wrong credentials given by the user), you might want to show an inline error message on the input field."}),"\n",(0,n.jsxs)(s.p,{children:["For this purpose, you can set this to option ",(0,n.jsx)(s.code,{children:"redirect: false"}),"."]}),"\n",(0,n.jsx)(s.h4,{id:e[20].id,children:e[20].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"redirectTo"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Specify where the user should be redirected to after a successful signin.\nDefaults to the page URL the sign-in is initiated from."}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[21].id,children:e[21].value}),"\n",(0,n.jsx)(s.h3,{id:e[22].id,children:e[22].value}),"\n",(0,n.jsx)(s.h4,{id:e[23].id,children:e[23].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"code"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"undefined"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" string;"})]})})}),"\n",(0,n.jsx)(s.h4,{id:e[24].id,children:e[24].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"error"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"undefined"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" string;"})]})})}),"\n",(0,n.jsx)(s.h4,{id:e[25].id,children:e[25].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"ok"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,n.jsx)(s.h4,{id:e[26].id,children:e[26].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"status"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": number;"})]})})}),"\n",(0,n.jsx)(s.h4,{id:e[27].id,children:e[27].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"url"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" string;"})]})})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[28].id,children:e[28].value}),"\n",(0,n.jsx)(s.h3,{id:e[29].id,children:e[29].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Value"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"R"})," extends ",(0,n.jsx)(s.code,{children:"boolean"})]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"true"})})]})})]}),"\n",(0,n.jsx)(s.h3,{id:e[30].id,children:e[30].value}),"\n",(0,n.jsx)(s.h4,{id:e[31].id,children:e[31].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"callbackUrl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,n.jsx)(s.h5,{id:e[32].id,children:e[32].value}),"\n",(0,n.jsxs)(s.p,{children:["Use ",(0,n.jsx)(s.code,{children:"redirectTo"})," instead."]}),"\n",(0,n.jsx)(s.h4,{id:e[33].id,children:e[33].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"redirect"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"R"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["[Documentation](",(0,n.jsx)(s.a,{href:"https://next-auth.js.org/getting-started/client#using-the-redirect-false-option-1",children:"https://next-auth.js.org/getting-started/client#using-the-redirect-false-option-1"})]}),"\n",(0,n.jsx)(s.h4,{id:e[34].id,children:e[34].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"redirectTo"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["If you pass ",(0,n.jsx)(s.code,{children:"redirect: false"}),", the page will not reload.\nThe session will be deleted, and ",(0,n.jsx)(s.code,{children:"useSession"})," is notified, so any indication about the user will be shown as logged out automatically.\nIt can give a very nice experience for the user."]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[35].id,children:e[35].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"type"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" LiteralUnion"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"T"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:", "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"U"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:">: T | U & Record<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"never"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:", "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"never"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:">;"})]})})}),"\n",(0,n.jsx)(s.h3,{id:e[36].id,children:e[36].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Value"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"T"})," extends ",(0,n.jsx)(s.code,{children:"U"})]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:"-"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"U"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"string"})})]})]})]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[37].id,children:e[37].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"type"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" SessionContextValue"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"R"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:">: R extends true ? {"})]}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  data: Session;"})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  status"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"authenticated"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  update"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": UpdateSession;"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  } "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  data"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  status"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"loading"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  update"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": UpdateSession;"})]}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  } : {"})}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  data: Session;"})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  status: "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"authenticated"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  update: UpdateSession;"})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  } "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  data"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  status"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"unauthenticated"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "loading"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  update"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": UpdateSession;"})]}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"};"})})]})}),"\n",(0,n.jsxs)(s.p,{children:["useSession() returns an object containing three things: a method called ",(0,n.jsx)(s.a,{href:"react#updatesession",children:"update"}),", ",(0,n.jsx)(s.code,{children:"data"})," and ",(0,n.jsx)(s.code,{children:"status"}),"."]}),"\n",(0,n.jsx)(s.h3,{id:e[38].id,children:e[38].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Value"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"R"})," extends ",(0,n.jsx)(s.code,{children:"boolean"})]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"false"})})]})})]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[39].id,children:e[39].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"type"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" UpdateSession"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": (data?) "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"="}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"> "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"Promise"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"Session"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:">;"})]})})}),"\n",(0,n.jsx)(s.h3,{id:e[40].id,children:e[40].value}),"\n",(0,n.jsx)(s.p,{children:"Document"}),"\n",(0,n.jsx)(s.h3,{id:e[41].id,children:e[41].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"data"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"any"})})]})})]}),"\n",(0,n.jsx)(s.h3,{id:e[42].id,children:e[42].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,n.jsx)(s.code,{children:"Promise"})}),"<",(0,n.jsx)(s.a,{href:"../nextjs#session-2",children:(0,n.jsx)(s.code,{children:"Session"})})," | ",(0,n.jsx)(s.code,{children:"null"}),">"]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[43].id,children:e[43].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" SessionContext"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" Context"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"undefined"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"  data"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" Session"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"  status"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "authenticated"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"  update"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" UpdateSession"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  } "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"  data"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"  status"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "loading"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "unauthenticated"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"  update"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" UpdateSession"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"}>;"})})]})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[44].id,children:e[44].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" __NEXTAUTH"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" AuthClientConfig"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[45].id,children:e[45].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"SessionProvider"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(props): Element"})]})})}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://react.dev/learn/passing-data-deeply-with-context",children:"React Context"})," provider to wrap the app (",(0,n.jsx)(s.code,{children:"pages/"}),") to make session data available anywhere."]}),"\n",(0,n.jsxs)(s.p,{children:["When used, the session state is automatically synchronized across all open tabs/windows and they are all updated whenever they gain or lose focus\nor the state changes (e.g. a user signs in or out) when ",(0,n.jsx)(s.a,{href:"react#refetchonwindowfocus",children:"SessionProviderProps.refetchOnWindowFocus"})," is ",(0,n.jsx)(s.code,{children:"true"}),"."]}),"\n",(0,n.jsx)(t.U,{type:"info",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.code,{children:"SessionProvider"})," is for client-side use only and when using ",(0,n.jsxs)(s.a,{href:"https://nextjs.org/blog/next-13-4#nextjs-app-router",children:["Next.js App Router (",(0,n.jsx)(s.code,{children:"app/"}),")"]})," you should prefer the ",(0,n.jsx)(s.code,{children:"auth()"})," export."]})}),"\n",(0,n.jsx)(s.h3,{id:e[46].id,children:e[46].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"props"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"react#sessionproviderprops",children:(0,n.jsx)(s.code,{children:"SessionProviderProps"})})})]})})]}),"\n",(0,n.jsx)(s.h3,{id:e[47].id,children:e[47].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Element"})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[48].id,children:e[48].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"getCsrfToken"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(): "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"Promise"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"string"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Returns the current Cross-Site Request Forgery Token (CSRF Token)\nrequired to make requests that changes state. (e.g. signing in or out, or updating the session)."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#double-submit-cookie",children:"CSRF Prevention: Double Submit Cookie"})}),"\n",(0,n.jsx)(s.h3,{id:e[49].id,children:e[49].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,n.jsx)(s.code,{children:"Promise"})}),"<",(0,n.jsx)(s.code,{children:"string"}),">"]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[50].id,children:e[50].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"getProviders"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(): "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"Promise"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" ProvidersType"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Returns a client-safe configuration object of the currently\navailable providers."}),"\n",(0,n.jsx)(s.h3,{id:e[51].id,children:e[51].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,n.jsx)(s.code,{children:"Promise"})}),"<",(0,n.jsx)(s.code,{children:"null"})," | ",(0,n.jsx)(s.code,{children:"ProvidersType"}),">"]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[52].id,children:e[52].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"getSession"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(params"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"?"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" Promise"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Session"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,n.jsx)(s.h3,{id:e[53].id,children:e[53].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"react#getsessionparams",children:(0,n.jsx)(s.code,{children:"GetSessionParams"})})})]})})]}),"\n",(0,n.jsx)(s.h3,{id:e[54].id,children:e[54].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,n.jsx)(s.code,{children:"Promise"})}),"<",(0,n.jsx)(s.code,{children:"null"})," | ",(0,n.jsx)(s.a,{href:"../nextjs#session-2",children:(0,n.jsx)(s.code,{children:"Session"})}),">"]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[55].id,children:e[55].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"signIn"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"P"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:">("})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"   provider"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"?"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:", "})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"   options"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"?"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:", "})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"authorizationParams"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"?"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" Promise"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"P"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" extends RedirectableProviderType "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"?"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" SignInResponse "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" undefined"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" :"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" undefined"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})]})}),"\n",(0,n.jsx)(s.p,{children:"Initiate a signin flow or send the user to the signin page listing all possible providers.\nHandles CSRF protection."}),"\n",(0,n.jsx)(s.h3,{id:e[56].id,children:e[56].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Value"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"P"})," extends ",(0,n.jsx)(s.code,{children:"undefined"})," | ",(0,n.jsx)(s.a,{href:"../core/providers#redirectableprovidertype",children:(0,n.jsx)(s.code,{children:"RedirectableProviderType"})})]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"undefined"})})]})})]}),"\n",(0,n.jsx)(s.h3,{id:e[57].id,children:e[57].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"provider"}),"?"]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.a,{href:"react#literaluniontu",children:(0,n.jsx)(s.code,{children:"LiteralUnion"})}),"<",(0,n.jsx)(s.code,{children:"P"})," extends ",(0,n.jsx)(s.a,{href:"../core/providers#redirectableprovidertype",children:(0,n.jsx)(s.code,{children:"RedirectableProviderType"})})," ? BuiltInProviderType | P : ",(0,n.jsx)(s.a,{href:"../core/providers#builtinprovidertype",children:(0,n.jsx)(s.code,{children:"BuiltInProviderType"})}),">"]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"options"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"react#signinoptions",children:(0,n.jsx)(s.code,{children:"SignInOptions"})})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"authorizationParams"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"SignInAuthorizationParams"})})]})]})]}),"\n",(0,n.jsx)(s.h3,{id:e[58].id,children:e[58].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,n.jsx)(s.code,{children:"Promise"})}),"<",(0,n.jsx)(s.code,{children:"P"})," extends ",(0,n.jsx)(s.a,{href:"../core/providers#redirectableprovidertype",children:(0,n.jsx)(s.code,{children:"RedirectableProviderType"})})," ? ",(0,n.jsx)(s.a,{href:"react#signinresponse",children:(0,n.jsx)(s.code,{children:"SignInResponse"})})," | ",(0,n.jsx)(s.code,{children:"undefined"})," : ",(0,n.jsx)(s.code,{children:"undefined"}),">"]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[59].id,children:e[59].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"signOut"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"R"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:">(options"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"?"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" Promise"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"R"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" extends "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"true"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ?"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" undefined"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" :"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" SignOutResponse"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Initiate a signout, by destroying the current session.\nHandles CSRF protection."}),"\n",(0,n.jsx)(s.h3,{id:e[60].id,children:e[60].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Value"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"R"})," extends ",(0,n.jsx)(s.code,{children:"boolean"})]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"true"})})]})})]}),"\n",(0,n.jsx)(s.h3,{id:e[61].id,children:e[61].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"options"}),"?"]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.a,{href:"react#signoutparamsr",children:(0,n.jsx)(s.code,{children:"SignOutParams"})}),"<",(0,n.jsx)(s.code,{children:"R"}),">"]})]})})]}),"\n",(0,n.jsx)(s.h3,{id:e[62].id,children:e[62].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,n.jsx)(s.code,{children:"Promise"})}),"<",(0,n.jsx)(s.code,{children:"R"})," extends ",(0,n.jsx)(s.code,{children:"true"})," ? ",(0,n.jsx)(s.code,{children:"undefined"})," : ",(0,n.jsx)(s.code,{children:"SignOutResponse"}),">"]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h2,{id:e[63].id,children:e[63].value}),"\n",(0,n.jsx)(s.pre,{icon:r.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"useSession"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"R"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:">(options"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"?"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" SessionContextValue"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"R"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,n.jsx)(s.p,{children:"React Hook that gives you access to the logged in user’s session data and lets you modify it."}),"\n",(0,n.jsx)(t.U,{type:"info",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.code,{children:"useSession"})," is for client-side use only and when using ",(0,n.jsxs)(s.a,{href:"https://nextjs.org/blog/next-13-4#nextjs-app-router",children:["Next.js App Router (",(0,n.jsx)(s.code,{children:"app/"}),")"]})," you should prefer the ",(0,n.jsx)(s.code,{children:"auth()"})," export."]})}),"\n",(0,n.jsx)(s.h3,{id:e[64].id,children:e[64].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsx)(s.tr,{children:(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type parameter"})})}),(0,n.jsx)(s.tbody,{children:(0,n.jsx)(s.tr,{children:(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"R"})," extends ",(0,n.jsx)(s.code,{children:"boolean"})]})})})]}),"\n",(0,n.jsx)(s.h3,{id:e[65].id,children:e[65].value}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,n.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,n.jsx)(s.tbody,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"options"}),"?"]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"UseSessionOptions"}),"<",(0,n.jsx)(s.code,{children:"R"}),">"]})]})})]}),"\n",(0,n.jsx)(s.h3,{id:e[66].id,children:e[66].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"react#sessioncontextvaluer",children:(0,n.jsx)(s.code,{children:"SessionContextValue"})}),"<",(0,n.jsx)(s.code,{children:"R"}),">"]})]})},"/reference/nextjs/react",{filePath:"pages/reference/nextjs/react.mdx",pageMap:d.v,frontMatter:{},title:"react"},"undefined"==typeof RemoteContent?a:RemoteContent.useTOC)},74481:function(i,e,s){"use strict";s.d(e,{U:function(){return r}});var n=s(651),h=s(69577),d=s(21769);let l={default:"\uD83D\uDCA1",error:"\uD83D\uDEAB",info:(0,n.jsx)(d.AV,{className:"_mt-1"}),warning:"⚠️"},t={default:(0,h.Z)("_border-orange-100 _bg-orange-50 _text-orange-800 dark:_border-orange-400/30 dark:_bg-orange-400/20 dark:_text-orange-300"),error:(0,h.Z)("_border-red-200 _bg-red-100 _text-red-900 dark:_border-red-200/30 dark:_bg-red-900/30 dark:_text-red-200"),info:(0,h.Z)("_border-blue-200 _bg-blue-100 _text-blue-900 dark:_border-blue-200/30 dark:_bg-blue-900/30 dark:_text-blue-200"),warning:(0,h.Z)("_border-yellow-100 _bg-yellow-50 _text-yellow-900 dark:_border-yellow-200/30 dark:_bg-yellow-700/30 dark:_text-yellow-200")};function r({children:i,type:e="default",emoji:s=l[e]}){return(0,n.jsxs)("div",{className:(0,h.Z)("nextra-callout _overflow-x-auto _mt-6 _flex _rounded-lg _border _py-2 ltr:_pr-4 rtl:_pl-4","contrast-more:_border-current contrast-more:dark:_border-current",t[e]),children:[(0,n.jsx)("div",{className:"_select-none _text-xl ltr:_pl-3 ltr:_pr-2 rtl:_pr-3 rtl:_pl-2",style:{fontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},children:s}),(0,n.jsx)("div",{className:"_w-full _min-w-0 _leading-7",children:i})]})}}},function(i){i.O(0,[64211,1089,92888,49774,40179],function(){return i(i.s=37502)}),_N_E=i.O()}]);