<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66859],{34697:function(i,e,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reference/sveltekit/types",function(){return s(42848)}])},42848:function(i,e,s){"use strict";s.r(e),s.d(e,{useTOC:function(){return a}});var n=s(651),l=s(74139),h=s(21461),d=s(46062),t=s(39370),r=s(85131);function a(i){return[{value:"SvelteKitAuthConfig",id:"sveltekitauthconfig",depth:2},{value:"Extends",id:"extends",depth:3},{value:"Properties",id:"properties",depth:3},{value:"adapter?",id:"adapter",depth:4},{value:"Inherited from",id:"inherited-from",depth:5},{value:"basePath?",id:"basepath",depth:4},{value:"Default",id:"default",depth:5},{value:"Inherited from",id:"inherited-from-1",depth:5},{value:"callbacks?",id:"callbacks",depth:4},{value:"jwt()?",id:"jwt",depth:5},{value:"Parameters",id:"parameters",depth:6},{value:"Returns",id:"returns",depth:6},{value:"redirect()?",id:"redirect",depth:5},{value:"Example",id:"example",depth:6},{value:"Parameters",id:"parameters-1",depth:6},{value:"Returns",id:"returns-1",depth:6},{value:"session()?",id:"session",depth:5},{value:"Example",id:"example-1",depth:6},{value:"Parameters",id:"parameters-2",depth:6},{value:"Returns",id:"returns-2",depth:6},{value:"signIn()?",id:"signin",depth:5},{value:"Example",id:"example-2",depth:6},{value:"Parameters",id:"parameters-3",depth:6},{value:"Returns",id:"returns-3",depth:6},{value:"Inherited from",id:"inherited-from-2",depth:5},{value:"cookies?",id:"cookies",depth:4},{value:"Default",id:"default-1",depth:5},{value:"Inherited from",id:"inherited-from-3",depth:5},{value:"debug?",id:"debug",depth:4},{value:"Default",id:"default-2",depth:5},{value:"Inherited from",id:"inherited-from-4",depth:5},{value:"events?",id:"events",depth:4},{value:"Default",id:"default-3",depth:5},{value:"createUser()?",id:"createuser",depth:5},{value:"Parameters",id:"parameters-4",depth:6},{value:"Returns",id:"returns-4",depth:6},{value:"linkAccount()?",id:"linkaccount",depth:5},{value:"Parameters",id:"parameters-5",depth:6},{value:"Returns",id:"returns-5",depth:6},{value:"session()?",id:"session-1",depth:5},{value:"Parameters",id:"parameters-6",depth:6},{value:"Returns",id:"returns-6",depth:6},{value:"signIn()?",id:"signin-1",depth:5},{value:"Parameters",id:"parameters-7",depth:6},{value:"Returns",id:"returns-7",depth:6},{value:"signOut()?",id:"signout",depth:5},{value:"Parameters",id:"parameters-8",depth:6},{value:"Returns",id:"returns-8",depth:6},{value:"updateUser()?",id:"updateuser",depth:5},{value:"Parameters",id:"parameters-9",depth:6},{value:"Returns",id:"returns-9",depth:6},{value:"Inherited from",id:"inherited-from-5",depth:5},{value:"experimental?",id:"experimental",depth:4},{value:"Note",id:"note",depth:5},{value:"Default",id:"default-4",depth:5},{value:"enableWebAuthn?",id:"enablewebauthn",depth:5},{value:"Default",id:"default-5",depth:6},{value:"Inherited from",id:"inherited-from-6",depth:5},{value:"jwt?",id:"jwt-1",depth:4},{value:"Inherited from",id:"inherited-from-7",depth:5},{value:"logger?",id:"logger",depth:4},{value:"Example",id:"example-3",depth:5},{value:"Default",id:"default-6",depth:5},{value:"Inherited from",id:"inherited-from-8",depth:5},{value:"pages?",id:"pages",depth:4},{value:"Default",id:"default-7",depth:5},{value:"Example",id:"example-4",depth:5},{value:"Inherited from",id:"inherited-from-9",depth:5},{value:"providers",id:"providers",depth:4},{value:"Default",id:"default-8",depth:5},{value:"Inherited from",id:"inherited-from-10",depth:5},{value:"redirectProxyUrl?",id:"redirectproxyurl",depth:4},{value:"Note",id:"note-1",depth:5},{value:"Example",id:"example-5",depth:5},{value:"Example",id:"example-6",depth:5},{value:"Default",id:"default-9",depth:5},{value:"Inherited from",id:"inherited-from-11",depth:5},{value:"secret?",id:"secret",depth:4},{value:"Note",id:"note-2",depth:5},{value:"Inherited from",id:"inherited-from-12",depth:5},{value:"session?",id:"session-2",depth:4},{value:"generateSessionToken()?",id:"generatesessiontoken",depth:5},{value:"Default",id:"default-10",depth:6},{value:"Returns",id:"returns-10",depth:6},{value:"maxAge?",id:"maxage",depth:5},{value:"Default",id:"default-11",depth:6},{value:"strategy?",id:"strategy",depth:5},{value:"updateAge?",id:"updateage",depth:5},{value:"Default",id:"default-12",depth:6},{value:"Inherited from",id:"inherited-from-13",depth:5},{value:"skipCSRFCheck?",id:"skipcsrfcheck",depth:4},{value:"Inherited from",id:"inherited-from-14",depth:5},{value:"theme?",id:"theme",depth:4},{value:"Inherited from",id:"inherited-from-15",depth:5},{value:"trustHost?",id:"trusthost",depth:4},{value:"Inherited from",id:"inherited-from-16",depth:5},{value:"useSecureCookies?",id:"usesecurecookies",depth:4},{value:"Inherited from",id:"inherited-from-17",depth:5}]}e.default=(0,l.c)(function(i){let{toc:e=a(i)}=i,s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",li:"li",p:"p",pre:"pre",span:"span",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.a)(),...i.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"types"}),"\n",(0,n.jsx)(s.h2,{id:e[0].id,children:e[0].value}),"\n",(0,n.jsx)(s.p,{children:"Configure the SvelteKitAuth method."}),"\n",(0,n.jsx)(s.h3,{id:e[1].id,children:e[1].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#omittype-keys",children:(0,n.jsx)(s.code,{children:"Omit"})}),"&lt;",(0,n.jsx)(s.a,{href:"../core#authconfig",children:(0,n.jsx)(s.code,{children:"AuthConfig"})}),", ",(0,n.jsx)(s.code,{children:'"raw"'}),"&gt;"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:e[2].id,children:e[2].value}),"\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:"adapter"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Adapter;"})]})})}),"\n",(0,n.jsx)(s.p,{children:"You can use the adapter option to pass in your database adapter."}),"\n",(0,n.jsx)(s.h5,{id:e[4].id,children:e[4].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.adapter"})}),"\n",(0,n.jsx)(s.h4,{id:e[5].id,children:e[5].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.p,{children:"The base path of the Auth.js API endpoints."}),"\n",(0,n.jsx)(s.h5,{id:e[6].id,children:e[6].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":"#032F62","--shiki-dark":"#9ECBFF"},children:'"/api/auth"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" in"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "next-auth"'}),(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:'"/auth"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" with"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" all other frameworks"})]})})}),"\n",(0,n.jsx)(s.h5,{id:e[7].id,children:e[7].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.basePath"})}),"\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.jsxs)(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:"callbacks"}),(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:"  jwt"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"params"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(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":"#005CC5","--shiki-dark":"#79B8FF"},children:" JWT"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(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:"  redirect"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"params"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(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:"&gt;"}),(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:"  session"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"params"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(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:"|"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" DefaultSession"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(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:"  signIn"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"params"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(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:"|"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" boolean"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(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.jsxs)(s.p,{children:["Callbacks are asynchronous functions you can use to control what happens when an action is performed.\nCallbacks are ",(0,n.jsx)(s.em,{children:"extremely powerful"}),", especially in scenarios involving JSON Web Tokens\nas they ",(0,n.jsx)(s.strong,{children:"allow you to implement access controls without a database"})," and to ",(0,n.jsx)(s.strong,{children:"integrate with external databases or APIs"}),"."]}),"\n",(0,n.jsx)(s.h5,{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":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"jwt"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"params"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(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":"#005CC5","--shiki-dark":"#79B8FF"},children:" JWT"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:"This callback is called whenever a JSON Web Token is created (i.e. at sign in)\nor updated (i.e whenever a session is accessed in the client). Anything you\nreturn here will be saved in the JWT and forwarded to the session callback.\nThere you can control what should be returned to the client. Anything else\nwill be kept from your frontend. The JWT is encrypted by default via your\nAUTH_SECRET environment variable."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsxs)(s.a,{href:"https://authjs.dev/reference/core/types#session",children:[(0,n.jsx)(s.code,{children:"session"})," callback"]})}),"\n",(0,n.jsx)(s.h6,{id:e[10].id,children:e[10].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.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(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.code,{children:"Object"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:"-"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.account"}),"?"]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"null"})," | ",(0,n.jsx)(s.a,{href:"../sveltekit#account",children:(0,n.jsx)(s.code,{children:"Account"})})]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["Contains information about the provider that was used to sign in.",(0,n.jsx)("br",{}),"Also includes TokenSet",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)(s.strong,{children:"Note"}),(0,n.jsx)("br",{}),"available when ",(0,n.jsx)(s.code,{children:"trigger"})," is ",(0,n.jsx)(s.code,{children:'"signIn"'})," or ",(0,n.jsx)(s.code,{children:'"signUp"'})]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.isNewUser"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"boolean"})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.strong,{children:"Deprecated"}),(0,n.jsx)("br",{}),"use ",(0,n.jsx)(s.code,{children:'trigger === "signUp"'})," instead"]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.profile"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../sveltekit#profile",children:(0,n.jsx)(s.code,{children:"Profile"})})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["The OAuth profile returned from your provider.",(0,n.jsx)("br",{}),"(In case of OIDC it will be the decoded ID Token or /userinfo response)",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)(s.strong,{children:"Note"}),(0,n.jsx)("br",{}),"available when ",(0,n.jsx)(s.code,{children:"trigger"})," is ",(0,n.jsx)(s.code,{children:'"signIn"'}),"."]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.session"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"any"})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["When using ",(0,n.jsx)(s.a,{href:"../core#session-2",children:"AuthConfig.session"})," ",(0,n.jsx)(s.code,{children:'strategy: "jwt"'}),", this is the data",(0,n.jsx)("br",{}),"sent from the client via the ",(0,n.jsx)(s.code,{children:"useSession().update"})," method.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"⚠ Note, you should validate this data before using it."]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"params.token"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../core/jwt#jwt",children:(0,n.jsx)(s.code,{children:"JWT"})})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["When ",(0,n.jsx)(s.code,{children:"trigger"})," is ",(0,n.jsx)(s.code,{children:'"signIn"'})," or ",(0,n.jsx)(s.code,{children:'"signUp"'}),", it will be a subset of ",(0,n.jsx)(s.a,{href:"../core/jwt#jwt",children:"JWT"}),",",(0,n.jsx)("br",{}),(0,n.jsx)(s.code,{children:"name"}),", ",(0,n.jsx)(s.code,{children:"email"})," and ",(0,n.jsx)(s.code,{children:"image"})," will be included.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Otherwise, it will be the full ",(0,n.jsx)(s.a,{href:"../core/jwt#jwt",children:"JWT"})," for subsequent calls."]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.trigger"}),"?"]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:'"signIn"'})," | ",(0,n.jsx)(s.code,{children:'"update"'})," | ",(0,n.jsx)(s.code,{children:'"signUp"'})]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["Check why was the jwt callback invoked. Possible reasons are:",(0,n.jsx)("br",{}),"- user sign-in: First time the callback is invoked, ",(0,n.jsx)(s.code,{children:"user"}),", ",(0,n.jsx)(s.code,{children:"profile"})," and ",(0,n.jsx)(s.code,{children:"account"})," will be present.",(0,n.jsx)("br",{}),"- user sign-up: a user is created for the first time in the database (when ",(0,n.jsx)(s.a,{href:"../core#session-2",children:"AuthConfig.session"}),".strategy is set to ",(0,n.jsx)(s.code,{children:'"database"'}),")",(0,n.jsx)("br",{}),"- update event: Triggered by the ",(0,n.jsx)(s.code,{children:"useSession().update"})," method.",(0,n.jsx)("br",{}),"In case of the latter, ",(0,n.jsx)(s.code,{children:"trigger"})," will be ",(0,n.jsx)(s.code,{children:"undefined"}),"."]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"params.user"})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.a,{href:"../sveltekit#user-2",children:(0,n.jsx)(s.code,{children:"User"})})," | ",(0,n.jsx)(s.a,{href:"adapter#adapteruser",children:(0,n.jsx)(s.code,{children:"AdapterUser"})})]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["Either the result of the OAuthConfig.profile or the CredentialsConfig.authorize callback.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)(s.strong,{children:"Note"}),(0,n.jsx)("br",{}),"available when ",(0,n.jsx)(s.code,{children:"trigger"})," is ",(0,n.jsx)(s.code,{children:'"signIn"'})," or ",(0,n.jsx)(s.code,{children:'"signUp"'}),".",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Resources:",(0,n.jsx)("br",{}),"- ",(0,n.jsx)(s.a,{href:"https://authjs.dev/getting-started/authentication/credentials",children:"Credentials Provider"}),(0,n.jsx)("br",{}),"- ",(0,n.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#user-management",children:"User database model"})]})]})]})]}),"\n",(0,n.jsx)(s.h6,{id:e[11].id,children:e[11].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.code,{children:"null"})," | ",(0,n.jsx)(s.a,{href:"../core/jwt#jwt",children:(0,n.jsx)(s.code,{children:"JWT"})}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{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:"redirect"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"params"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(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:"&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:"This callback is called anytime the user is redirected to a callback URL (i.e. on signin or signout).\nBy default only URLs on the same host as the origin are allowed.\nYou can use this callback to customise that behaviour."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"https://authjs.dev/reference/core/types#redirect",children:"Documentation"})}),"\n",(0,n.jsx)(s.h6,{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.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"callbacks"}),(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:"  async "}),(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:"({ url, baseUrl }) {"})]}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"    // Allows relative callback URLs"})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"    if"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" (url."}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"startsWith"}),(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:'"/"'}),(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:"return"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" `${"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"baseUrl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"}${"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"url"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"}`"})]}),"\n",(0,n.jsx)(s.span,{children:" "}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"    // Allows callback URLs on the same origin"})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"    if"}),(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:"new"}),(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:"(url).origin "}),(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:" baseUrl) "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"return"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" url"})]}),"\n",(0,n.jsx)(s.span,{children:" "}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"    return"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" baseUrl"})]}),"\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:"}"})})]})}),"\n",(0,n.jsx)(s.h6,{id:e[14].id,children:e[14].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.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(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.code,{children:"Object"})}),(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:"params.baseUrl"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"string"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:"Default base URL of site (can be used as fallback)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"params.url"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"string"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:"URL provided as callback URL by the client"})]})]})]}),"\n",(0,n.jsx)(s.h6,{id:e[15].id,children:e[15].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.code,{children:"string"}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{id:e[16].id,children:e[16].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":"#E36209","--shiki-dark":"#FFAB70"},children:"params"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(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:"|"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" DefaultSession"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["This callback is called whenever a session is checked.\n(i.e. when invoking the ",(0,n.jsx)(s.code,{children:"/api/session"})," endpoint, using ",(0,n.jsx)(s.code,{children:"useSession"})," or ",(0,n.jsx)(s.code,{children:"getSession"}),").\nThe return value will be exposed to the client, so be careful what you return here!\nIf you want to make anything available to the client which you’ve added to the token\nthrough the JWT callback, you have to explicitly return it here as well."]}),"\n",(0,n.jsx)(t.U,{type:"info",children:(0,n.jsx)(s.p,{children:"⚠ By default, only a subset (email, name, image)\nof the token is returned for increased security."})}),"\n",(0,n.jsx)(s.p,{children:"The token argument is only available when using the jwt session strategy, and the\nuser argument is only available when using the database session strategy."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsxs)(s.a,{href:"https://authjs.dev/reference/core/types#jwt",children:[(0,n.jsx)(s.code,{children:"jwt"})," callback"]})}),"\n",(0,n.jsx)(s.h6,{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.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"callbacks"}),(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:"  async "}),(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:"({ session, token, user }) {"})]}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"    // Send properties to the client, like an access_token from a provider."})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"    session.accessToken "}),(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:" token.accessToken"})]}),"\n",(0,n.jsx)(s.span,{children:" "}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"    return"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" session"})]}),"\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:"}"})})]})}),"\n",(0,n.jsx)(s.h6,{id:e[18].id,children:e[18].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:"params"})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["{ ",(0,n.jsx)(s.code,{children:"session"}),": { ",(0,n.jsx)(s.code,{children:"user"}),": ",(0,n.jsx)(s.a,{href:"adapter#adapteruser",children:(0,n.jsx)(s.code,{children:"AdapterUser"})}),"; } &amp; ",(0,n.jsx)(s.a,{href:"adapter#adaptersession",children:(0,n.jsx)(s.code,{children:"AdapterSession"})}),"; ",(0,n.jsx)(s.code,{children:"user"}),": ",(0,n.jsx)(s.a,{href:"adapter#adapteruser",children:(0,n.jsx)(s.code,{children:"AdapterUser"})}),"; } &amp; { ",(0,n.jsx)(s.code,{children:"session"}),": ",(0,n.jsx)(s.a,{href:"../sveltekit#session",children:(0,n.jsx)(s.code,{children:"Session"})}),"; ",(0,n.jsx)(s.code,{children:"token"}),": ",(0,n.jsx)(s.a,{href:"../core/jwt#jwt",children:(0,n.jsx)(s.code,{children:"JWT"})}),"; } &amp; { ",(0,n.jsx)(s.code,{children:"newSession"}),": ",(0,n.jsx)(s.code,{children:"any"}),"; ",(0,n.jsx)(s.code,{children:"trigger"}),": ",(0,n.jsx)(s.code,{children:'"update"'}),"; }"]})]})})]}),"\n",(0,n.jsx)(s.h6,{id:e[19].id,children:e[19].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.a,{href:"../sveltekit#session",children:(0,n.jsx)(s.code,{children:"Session"})})," | ",(0,n.jsx)(s.a,{href:"../sveltekit#defaultsession",children:(0,n.jsx)(s.code,{children:"DefaultSession"})}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{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:"signIn"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"params"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(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:"|"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" boolean"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["Controls whether a user is allowed to sign in or not.\nReturning ",(0,n.jsx)(s.code,{children:"true"})," continues the sign-in flow.\nReturning ",(0,n.jsx)(s.code,{children:"false"})," or throwing an error will stop the sign-in flow and redirect the user to the error page.\nReturning a string will redirect the user to the specified URL."]}),"\n",(0,n.jsxs)(s.p,{children:["Unhandled errors will throw an ",(0,n.jsx)(s.code,{children:"AccessDenied"})," with the message set to the original error."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.a,{href:"https://authjs.dev/reference/core/errors#accessdenied",children:(0,n.jsx)(s.code,{children:"AccessDenied"})})}),"\n",(0,n.jsx)(s.h6,{id:e[21].id,children:e[21].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:"callbacks"}),(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:" async "}),(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:"({ profile }) {"})]}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:'  // Only allow sign in for users with email addresses ending with "yourdomain.com"'})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"  return"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" profile?.email?."}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"endsWith"}),(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:'"@yourdomain.com"'}),(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.h6,{id:e[22].id,children:e[22].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.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(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.code,{children:"Object"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:"-"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.account"}),"?"]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"null"})," | ",(0,n.jsx)(s.a,{href:"../sveltekit#account",children:(0,n.jsx)(s.code,{children:"Account"})})]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:"-"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.credentials"}),"?"]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},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"})}),"&lt;",(0,n.jsx)(s.code,{children:"string"}),", ",(0,n.jsx)(s.a,{href:"../core/providers/credentials#credentialinput",children:(0,n.jsx)(s.code,{children:"CredentialInput"})}),"&gt;"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:"If Credentials provider is used, it contains the user credentials"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.email"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"Object"})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["If Email provider is used, on the first call, it contains a",(0,n.jsx)("br",{}),(0,n.jsx)(s.code,{children:"verificationRequest: true"})," property to indicate it is being triggered in the verification request flow.",(0,n.jsx)("br",{}),"When the callback is invoked after a user has clicked on a sign in link,",(0,n.jsx)("br",{}),"this property will not be present. You can check for the ",(0,n.jsx)(s.code,{children:"verificationRequest"})," property",(0,n.jsx)("br",{}),"to avoid sending emails to addresses or domains on a blocklist or to only explicitly generate them",(0,n.jsx)("br",{}),"for email address in an allow list."]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.email.verificationRequest"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"boolean"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:"-"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"params.profile"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../sveltekit#profile",children:(0,n.jsx)(s.code,{children:"Profile"})})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["If OAuth provider is used, it contains the full",(0,n.jsx)("br",{}),"OAuth profile returned by your provider."]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"params.user"})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.a,{href:"../sveltekit#user-2",children:(0,n.jsx)(s.code,{children:"User"})})," | ",(0,n.jsx)(s.a,{href:"adapter#adapteruser",children:(0,n.jsx)(s.code,{children:"AdapterUser"})})]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:"-"})]})]})]}),"\n",(0,n.jsx)(s.h6,{id:e[23].id,children:e[23].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.code,{children:"string"})," | ",(0,n.jsx)(s.code,{children:"boolean"}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{id:e[24].id,children:e[24].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.callbacks"})}),"\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":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"cookies"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Partial"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"CookiesOptions"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:"You can override the default cookie names and options for any of the cookies used by Auth.js.\nYou can specify one or more cookies with custom properties\nand missing options will use the default values defined by Auth.js.\nIf you use this feature, you will likely want to create conditional behavior\nto support setting different cookies policies in development and production builds,\nas you will be opting out of the built-in dynamic policy."}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["⚠ ",(0,n.jsx)(s.strong,{children:"This is an advanced option."})," Advanced options are passed the same way as basic options,\nbut ",(0,n.jsx)(s.strong,{children:"may have complex implications"})," or side effects.\nYou should ",(0,n.jsx)(s.strong,{children:"try to avoid using advanced options"})," unless you are very comfortable using them."]}),"\n"]}),"\n",(0,n.jsx)(s.h5,{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.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"{}"})})})}),"\n",(0,n.jsx)(s.h5,{id:e[27].id,children:e[27].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.cookies"})}),"\n",(0,n.jsx)(s.h4,{id:e[28].id,children:e[28].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:"debug"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Set debug to true to enable debug messages for authentication and database operations."}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["⚠ If you added a custom ",(0,n.jsx)(s.a,{href:"../core#logger",children:"AuthConfig.logger"}),", this setting is ignored."]}),"\n"]}),"\n",(0,n.jsx)(s.h5,{id:e[29].id,children:e[29].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.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"false"})})})}),"\n",(0,n.jsx)(s.h5,{id:e[30].id,children:e[30].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.debug"})}),"\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.jsxs)(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:"events"}),(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:"  createUser"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(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:"  linkAccount"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(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:"  session"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(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:"  signIn"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(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:"  signOut"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(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:"  updateUser"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(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.p,{children:"Events are asynchronous functions that do not return a response, they are useful for audit logging.\nYou can specify a handler for any of these events below - e.g. for debugging or to create an audit log.\nThe content of the message object varies depending on the flow\n(e.g. OAuth or Email authentication flow, JWT or database sessions, etc),\nbut typically contains a user object and/or contents of the JSON Web Token\nand other information relevant to the event."}),"\n",(0,n.jsx)(s.h5,{id:e[32].id,children:e[32].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.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"{}"})})})}),"\n",(0,n.jsx)(s.h5,{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:"createUser"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.h6,{id:e[34].id,children:e[34].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.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"Object"})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message.user"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../sveltekit#user-2",children:(0,n.jsx)(s.code,{children:"User"})})})]})]})]}),"\n",(0,n.jsx)(s.h6,{id:e[35].id,children:e[35].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.code,{children:"void"}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{id:e[36].id,children:e[36].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:"linkAccount"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.h6,{id:e[37].id,children:e[37].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.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"Object"})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message.account"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../sveltekit#account",children:(0,n.jsx)(s.code,{children:"Account"})})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message.profile"})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.a,{href:"../sveltekit#user-2",children:(0,n.jsx)(s.code,{children:"User"})})," | ",(0,n.jsx)(s.a,{href:"adapter#adapteruser",children:(0,n.jsx)(s.code,{children:"AdapterUser"})})]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message.user"})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.a,{href:"../sveltekit#user-2",children:(0,n.jsx)(s.code,{children:"User"})})," | ",(0,n.jsx)(s.a,{href:"adapter#adapteruser",children:(0,n.jsx)(s.code,{children:"AdapterUser"})})]})]})]})]}),"\n",(0,n.jsx)(s.h6,{id:e[38].id,children:e[38].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.code,{children:"void"}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{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":"#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":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:"The message object will contain one of these depending on\nif you use JWT or database persisted sessions:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"token"}),": The JWT for this session."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"session"}),": The session object from your adapter."]}),"\n"]}),"\n",(0,n.jsx)(s.h6,{id:e[40].id,children:e[40].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.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"Object"})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message.session"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../sveltekit#session",children:(0,n.jsx)(s.code,{children:"Session"})})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message.token"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../core/jwt#jwt",children:(0,n.jsx)(s.code,{children:"JWT"})})})]})]})]}),"\n",(0,n.jsx)(s.h6,{id:e[41].id,children:e[41].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.code,{children:"void"}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{id:e[42].id,children:e[42].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:"signIn"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["If using a ",(0,n.jsx)(s.code,{children:"credentials"})," type auth, the user is the raw response from your\ncredential provider.\nFor other providers, you’ll get the User object from your adapter, the account,\nand an indicator if the user was new to your Adapter."]}),"\n",(0,n.jsx)(s.h6,{id:e[43].id,children:e[43].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.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"Object"})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"message.account"}),"?"]}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"null"})," | ",(0,n.jsx)(s.a,{href:"../sveltekit#account",children:(0,n.jsx)(s.code,{children:"Account"})})]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"message.isNewUser"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"boolean"})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,n.jsx)(s.code,{children:"message.profile"}),"?"]}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../sveltekit#profile",children:(0,n.jsx)(s.code,{children:"Profile"})})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message.user"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../sveltekit#user-2",children:(0,n.jsx)(s.code,{children:"User"})})})]})]})]}),"\n",(0,n.jsx)(s.h6,{id:e[44].id,children:e[44].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.code,{children:"void"}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{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":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(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":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:"The message object will contain one of these depending on\nif you use JWT or database persisted sessions:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"token"}),": The JWT for this session."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"session"}),": The session object from your adapter that is being ended."]}),"\n"]}),"\n",(0,n.jsx)(s.h6,{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:"message"})}),(0,n.jsxs)(s.td,{style:{textAlign:"left"},children:["{ ",(0,n.jsx)(s.code,{children:"session"}),": ",(0,n.jsx)(s.code,{children:"undefined"})," | ",(0,n.jsx)(s.code,{children:"null"})," | ",(0,n.jsx)(s.code,{children:"void"})," | ",(0,n.jsx)(s.a,{href:"adapter#adaptersession",children:(0,n.jsx)(s.code,{children:"AdapterSession"})}),"; } | { ",(0,n.jsx)(s.code,{children:"token"}),": ",(0,n.jsx)(s.code,{children:"null"})," | ",(0,n.jsx)(s.a,{href:"../core/jwt#jwt",children:(0,n.jsx)(s.code,{children:"JWT"})}),"; }"]})]})})]}),"\n",(0,n.jsx)(s.h6,{id:e[47].id,children:e[47].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.code,{children:"void"}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{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":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"updateUser"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": ("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;void&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.h6,{id:e[49].id,children:e[49].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.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"Object"})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.code,{children:"message.user"})}),(0,n.jsx)(s.td,{style:{textAlign:"left"},children:(0,n.jsx)(s.a,{href:"../sveltekit#user-2",children:(0,n.jsx)(s.code,{children:"User"})})})]})]})]}),"\n",(0,n.jsx)(s.h6,{id:e[50].id,children:e[50].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"../core/types#awaitablet",children:(0,n.jsx)(s.code,{children:"Awaitable"})}),"&lt;",(0,n.jsx)(s.code,{children:"void"}),"&gt;"]}),"\n",(0,n.jsx)(s.h5,{id:e[51].id,children:e[51].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.events"})}),"\n",(0,n.jsx)(s.h4,{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.jsxs)(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:"experimental"}),(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:"  enableWebAuthn"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]}),"\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.p,{children:"Use this option to enable experimental features.\nWhen enabled, it will print a warning message to the console."}),"\n",(0,n.jsx)(s.h5,{id:e[53].id,children:e[53].value}),"\n",(0,n.jsx)(s.p,{children:"Experimental features are not guaranteed to be stable and may change or be removed without notice. Please use with caution."}),"\n",(0,n.jsx)(s.h5,{id:e[54].id,children:e[54].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.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"{}"})})})}),"\n",(0,n.jsx)(s.h5,{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.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:"enableWebAuthn"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Enable WebAuthn support."}),"\n",(0,n.jsx)(s.h6,{id:e[56].id,children:e[56].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.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"false"})})})}),"\n",(0,n.jsx)(s.h5,{id:e[57].id,children:e[57].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.experimental"})}),"\n",(0,n.jsx)(s.h4,{id:e[58].id,children:e[58].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:"jwt"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Partial"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"JWTOptions"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["JSON Web Tokens are enabled by default if you have not specified an ",(0,n.jsx)(s.a,{href:"../core#adapter",children:"AuthConfig.adapter"}),".\nJSON Web Tokens are encrypted (JWE) by default. We recommend you keep this behaviour."]}),"\n",(0,n.jsx)(s.h5,{id:e[59].id,children:e[59].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.jwt"})}),"\n",(0,n.jsx)(s.h4,{id:e[60].id,children:e[60].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:"logger"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Partial"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"LoggerInstance"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["Override any of the logger levels (",(0,n.jsx)(s.code,{children:"undefined"})," levels will use the built-in logger),\nand intercept logs in NextAuth. You can use this option to send NextAuth logs to a third-party logging service."]}),"\n",(0,n.jsx)(s.h5,{id:e[61].id,children:e[61].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.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// /auth.ts"})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"import"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" log "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"from"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "logging-service"'})]}),"\n",(0,n.jsx)(s.span,{children:" "}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"export"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" const"}),(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:"handlers"}),(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:"auth"}),(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:"signIn"}),(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:"signOut"}),(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":"#6F42C1","--shiki-dark":"#B392F0"},children:" NextAuth"}),(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:"  logger: {"})}),"\n",(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":"#E36209","--shiki-dark":"#FFAB70"},children:"code"}),(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":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"      log."}),(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:"(code, message)"})]}),"\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.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"    warn"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"code"}),(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":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"      log."}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"warn"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(code, message)"})]}),"\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.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"    debug"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"code"}),(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":"#E36209","--shiki-dark":"#FFAB70"},children:"message"}),(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:"      log."}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"debug"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(code, message)"})]}),"\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:"  }"})}),"\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.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["⚠ When set, the ",(0,n.jsx)(s.a,{href:"../core#debug",children:"AuthConfig.debug"})," option is ignored"]}),"\n"]}),"\n",(0,n.jsx)(s.h5,{id:e[62].id,children:e[62].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.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"console"})})})}),"\n",(0,n.jsx)(s.h5,{id:e[63].id,children:e[63].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.logger"})}),"\n",(0,n.jsx)(s.h4,{id:e[64].id,children:e[64].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:"pages"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Partial"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&lt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"PagesOptions"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Specify URLs to be used if you want to create custom sign in, sign out and error pages.\nPages specified will override the corresponding built-in page."}),"\n",(0,n.jsx)(s.h5,{id:e[65].id,children:e[65].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.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"{}"})})})}),"\n",(0,n.jsx)(s.h5,{id:e[66].id,children:e[66].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:"  pages"}),(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:"    signIn"}),(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:"'/auth/signin'"}),(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:"    signOut"}),(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:"'/auth/signout'"}),(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:"    error"}),(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:"'/auth/error'"}),(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:"    verifyRequest"}),(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:"'/auth/verify-request'"}),(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:"    newUser"}),(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:"'/auth/new-user'"})]}),"\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.h5,{id:e[67].id,children:e[67].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.pages"})}),"\n",(0,n.jsx)(s.h4,{id:e[68].id,children:e[68].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:"providers"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Provider[];"})]})})}),"\n",(0,n.jsx)(s.p,{children:"List of authentication providers for signing in\n(e.g. Google, Facebook, Twitter, GitHub, Email, etc) in any order.\nThis can be one of the built-in providers or an object with a custom provider."}),"\n",(0,n.jsx)(s.h5,{id:e[69].id,children:e[69].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.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"[]"})})})}),"\n",(0,n.jsx)(s.h5,{id:e[70].id,children:e[70].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.providers"})}),"\n",(0,n.jsx)(s.h4,{id:e[71].id,children:e[71].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:"redirectProxyUrl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["When set, during an OAuth sign-in flow,\nthe ",(0,n.jsx)(s.code,{children:"redirect_uri"})," of the authorization request\nwill be set based on this value."]}),"\n",(0,n.jsxs)(s.p,{children:["This is useful if your OAuth Provider only supports a single ",(0,n.jsx)(s.code,{children:"redirect_uri"}),"\nor you want to use OAuth on preview URLs (like Vercel), where you don’t know the final deployment URL beforehand."]}),"\n",(0,n.jsx)(s.p,{children:"The url needs to include the full path up to where Auth.js is initialized."}),"\n",(0,n.jsx)(s.h5,{id:e[72].id,children:e[72].value}),"\n",(0,n.jsxs)(s.p,{children:["This will auto-enable the ",(0,n.jsx)(s.code,{children:"state"})," OAuth2Config.checks on the provider."]}),"\n",(0,n.jsx)(s.h5,{id:e[73].id,children:e[73].value}),"\n",(0,n.jsx)(s.pre,{tabIndex:"0","data-language":"plaintext","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{children:'"https://authjs.example.com/api/auth"'})})})}),"\n",(0,n.jsx)(s.p,{children:"You can also override this individually for each provider."}),"\n",(0,n.jsx)(s.h5,{id:e[74].id,children:e[74].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:"GitHub"}),(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":"#D73A49","--shiki-dark":"#F97583"},children:"  ..."})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  redirectProxyUrl: "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"https://github.example.com/api/auth"'})]}),"\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.h5,{id:e[75].id,children:e[75].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.code,{children:"AUTH_REDIRECT_PROXY_URL"})," environment variable"]}),"\n",(0,n.jsxs)(s.p,{children:["See also: ",(0,n.jsx)(s.a,{href:"https://authjs.dev/getting-started/deployment#securing-a-preview-deployment",children:"Guide: Securing a Preview Deployment"})]}),"\n",(0,n.jsx)(s.h5,{id:e[76].id,children:e[76].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.redirectProxyUrl"})}),"\n",(0,n.jsx)(s.h4,{id:e[77].id,children:e[77].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:"secret"}),(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:"|"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" string[];"})]})})}),"\n",(0,n.jsx)(s.p,{children:"A random string used to hash tokens, sign cookies and generate cryptographic keys."}),"\n",(0,n.jsxs)(s.p,{children:["To generate a random string, you can use the Auth.js CLI: ",(0,n.jsx)(s.code,{children:"npx auth secret"})]}),"\n",(0,n.jsx)(s.h5,{id:e[78].id,children:e[78].value}),"\n",(0,n.jsx)(s.p,{children:"You can also pass an array of secrets, in which case the first secret that successfully\ndecrypts the JWT will be used. This is useful for rotating secrets without invalidating existing sessions.\nThe newer secret should be added to the start of the array, which will be used for all new sessions."}),"\n",(0,n.jsx)(s.h5,{id:e[79].id,children:e[79].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.secret"})}),"\n",(0,n.jsx)(s.h4,{id:e[80].id,children:e[80].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":"#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:": {"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  generateSessionToken"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" string;"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  maxAge"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": number;"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  strategy"}),(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:'"jwt"'}),(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:' "database"'}),(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:"  updateAge"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": number;"})]}),"\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.p,{children:"Configure your session like if you want to use JWT or a database,\nhow long until an idle session expires, or to throttle write operations in case you are using a database."}),"\n",(0,n.jsx)(s.h5,{id:e[81].id,children:e[81].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:"generateSessionToken"}),(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:"=&gt;"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" string;"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Generate a custom session token for database-based sessions.\nBy default, a random UUID or string is generated depending on the Node.js version.\nHowever, you can specify your own custom string (such as CUID) to be used."}),"\n",(0,n.jsx)(s.h6,{id:e[82].id,children:e[82].value}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.code,{children:"randomUUID"})," or ",(0,n.jsx)(s.code,{children:"randomBytes.toHex"})," depending on the Node.js version"]}),"\n",(0,n.jsx)(s.h6,{id:e[83].id,children:e[83].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"string"})}),"\n",(0,n.jsx)(s.h5,{id:e[84].id,children:e[84].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:"maxAge"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": number;"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Relative time from now in seconds when to expire the session"}),"\n",(0,n.jsx)(s.h6,{id:e[85].id,children:e[85].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":"#005CC5","--shiki-dark":"#79B8FF"},children:"2592000"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" // 30 days"})]})})}),"\n",(0,n.jsx)(s.h5,{id:e[86].id,children:e[86].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:"strategy"}),(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:'"jwt"'}),(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:' "database"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["Choose how you want to save the user session.\nThe default is ",(0,n.jsx)(s.code,{children:'"jwt"'}),", an encrypted JWT (JWE) in the session cookie."]}),"\n",(0,n.jsxs)(s.p,{children:["If you use an ",(0,n.jsx)(s.code,{children:"adapter"})," however, we default it to ",(0,n.jsx)(s.code,{children:'"database"'})," instead.\nYou can still force a JWT session by explicitly defining ",(0,n.jsx)(s.code,{children:'"jwt"'}),"."]}),"\n",(0,n.jsxs)(s.p,{children:["When using ",(0,n.jsx)(s.code,{children:'"database"'}),", the session cookie will only contain a ",(0,n.jsx)(s.code,{children:"sessionToken"})," value,\nwhich is used to look up the session in the database."]}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://authjs.dev/reference/core#authconfig#session",children:"Documentation"})," | ",(0,n.jsx)(s.a,{href:"https://authjs.dev/reference/core#authconfig#adapter",children:"Adapter"})," | ",(0,n.jsx)(s.a,{href:"https://authjs.dev/concepts/session-strategies#jwt-session",children:"About JSON Web Tokens"})]}),"\n",(0,n.jsx)(s.h5,{id:e[87].id,children:e[87].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:"updateAge"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": number;"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["How often the session should be updated in seconds.\nIf set to ",(0,n.jsx)(s.code,{children:"0"}),", session is updated every time."]}),"\n",(0,n.jsx)(s.h6,{id:e[88].id,children:e[88].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":"#005CC5","--shiki-dark":"#79B8FF"},children:"86400"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" // 1 day"})]})})}),"\n",(0,n.jsx)(s.h5,{id:e[89].id,children:e[89].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.session"})}),"\n",(0,n.jsx)(s.h4,{id:e[90].id,children:e[90].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:"skipCSRFCheck"}),(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:"typeof"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" skipCSRFCheck;"})]})})}),"\n",(0,n.jsx)(s.h5,{id:e[91].id,children:e[91].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.skipCSRFCheck"})}),"\n",(0,n.jsx)(s.h4,{id:e[92].id,children:e[92].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:"theme"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Theme;"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["Changes the theme of built-in ",(0,n.jsx)(s.a,{href:"../core#pages",children:"AuthConfig.pages"}),"."]}),"\n",(0,n.jsx)(s.h5,{id:e[93].id,children:e[93].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.theme"})}),"\n",(0,n.jsx)(s.h4,{id:e[94].id,children:e[94].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:"trustHost"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["Auth.js relies on the incoming request’s ",(0,n.jsx)(s.code,{children:"host"})," header to function correctly. For this reason this property needs to be set to ",(0,n.jsx)(s.code,{children:"true"}),"."]}),"\n",(0,n.jsxs)(s.p,{children:["Make sure that your deployment platform sets the ",(0,n.jsx)(s.code,{children:"host"})," header safely."]}),"\n",(0,n.jsx)(t.U,{type:"info",children:(0,n.jsxs)(s.p,{children:["Official Auth.js-based libraries will attempt to set this value automatically for some deployment platforms (eg.: Vercel) that are known to set the ",(0,n.jsx)(s.code,{children:"host"})," header safely."]})}),"\n",(0,n.jsx)(s.h5,{id:e[95].id,children:e[95].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.trustHost"})}),"\n",(0,n.jsx)(s.h4,{id:e[96].id,children:e[96].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:"useSecureCookies"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["When set to ",(0,n.jsx)(s.code,{children:"true"})," then all cookies set by NextAuth.js will only be accessible from HTTPS URLs.\nThis option defaults to ",(0,n.jsx)(s.code,{children:"false"})," on URLs that start with ",(0,n.jsx)(s.code,{children:"http://"})," (e.g. ",(0,n.jsx)(s.a,{href:"http://localhost:3000",children:"http://localhost:3000"}),") for developer convenience.\nYou can manually set this option to ",(0,n.jsx)(s.code,{children:"false"})," to disable this security feature and allow cookies\nto be accessible from non-secured URLs (this is not recommended)."]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["⚠ ",(0,n.jsx)(s.strong,{children:"This is an advanced option."})," Advanced options are passed the same way as basic options,\nbut ",(0,n.jsx)(s.strong,{children:"may have complex implications"})," or side effects.\nYou should ",(0,n.jsx)(s.strong,{children:"try to avoid using advanced options"})," unless you are very comfortable using them."]}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["The default is ",(0,n.jsx)(s.code,{children:"false"})," HTTP and ",(0,n.jsx)(s.code,{children:"true"})," for HTTPS sites."]}),"\n",(0,n.jsx)(s.h5,{id:e[97].id,children:e[97].value}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.code,{children:"Omit.useSecureCookies"})})]})},"/reference/sveltekit/types",{filePath:"pages/reference/sveltekit/types.mdx",pageMap:h.v,frontMatter:{},title:"types"},"undefined"==typeof RemoteContent?a:RemoteContent.useTOC)},39370:function(i,e,s){"use strict";s.d(e,{U:function(){return r}});var n=s(651),l=s(69577),h=s(85131);let d={default:"\uD83D\uDCA1",error:"\uD83D\uDEAB",info:(0,n.jsx)(h.AV,{className:"_mt-1"}),warning:"⚠️"},t={default:(0,l.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,l.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,l.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,l.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=d[e]}){return(0,n.jsxs)("div",{className:(0,l.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,[74139,21461,92888,49774,40179],function(){return i(i.s=34697)}),_N_E=i.O()}]);</pre></body></html>