(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37462],{83839:function(e,i,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reference/core/adapters",function(){return s(85560)}])},85560:function(e,i,s){"use strict";s.r(i),s.d(i,{useTOC:function(){return o}});var t=s(651),n=s(64464),r=s(46635),d=s(19829),a=s(29920),l=s(45013),h=s(82732),c=s(74661);function o(e){return[{value:"Installation",id:"installation",depth:2},{value:"Usage",id:"usage",depth:2},{value:"Models",id:"models",depth:2},{value:"Testing",id:"testing",depth:2},{value:"Known issues",id:"known-issues",depth:2},{value:"Token rotation",id:"token-rotation",depth:3},{value:"Federated logout",id:"federated-logout",depth:3},{value:"Adapter",id:"adapter",depth:2},{value:"Methods",id:"methods",depth:3},{value:"createAuthenticator()?",id:"createauthenticator",depth:4},{value:"Parameters",id:"parameters",depth:5},{value:"Returns",id:"returns",depth:5},{value:"createSession()?",id:"createsession",depth:4},{value:"Parameters",id:"parameters-1",depth:5},{value:"Returns",id:"returns-1",depth:5},{value:"createUser()?",id:"createuser",depth:4},{value:"Parameters",id:"parameters-2",depth:5},{value:"Returns",id:"returns-2",depth:5},{value:"createVerificationToken()?",id:"createverificationtoken",depth:4},{value:"Parameters",id:"parameters-3",depth:5},{value:"Returns",id:"returns-3",depth:5},{value:"deleteSession()?",id:"deletesession",depth:4},{value:"Parameters",id:"parameters-4",depth:5},{value:"Returns",id:"returns-4",depth:5},{value:"deleteUser()?",id:"deleteuser",depth:4},{value:"Parameters",id:"parameters-5",depth:5},{value:"Returns",id:"returns-5",depth:5},{value:"Todo",id:"todo",depth:5},{value:"getAccount()?",id:"getaccount",depth:4},{value:"Parameters",id:"parameters-6",depth:5},{value:"Returns",id:"returns-6",depth:5},{value:"getAuthenticator()?",id:"getauthenticator",depth:4},{value:"Parameters",id:"parameters-7",depth:5},{value:"Returns",id:"returns-7",depth:5},{value:"getSessionAndUser()?",id:"getsessionanduser",depth:4},{value:"Parameters",id:"parameters-8",depth:5},{value:"Returns",id:"returns-8",depth:5},{value:"getUser()?",id:"getuser",depth:4},{value:"Parameters",id:"parameters-9",depth:5},{value:"Returns",id:"returns-9",depth:5},{value:"getUserByAccount()?",id:"getuserbyaccount",depth:4},{value:"Parameters",id:"parameters-10",depth:5},{value:"Returns",id:"returns-10",depth:5},{value:"getUserByEmail()?",id:"getuserbyemail",depth:4},{value:"Parameters",id:"parameters-11",depth:5},{value:"Returns",id:"returns-11",depth:5},{value:"linkAccount()?",id:"linkaccount",depth:4},{value:"Parameters",id:"parameters-12",depth:5},{value:"Returns",id:"returns-12",depth:5},{value:"listAuthenticatorsByUserId()?",id:"listauthenticatorsbyuserid",depth:4},{value:"Parameters",id:"parameters-13",depth:5},{value:"Returns",id:"returns-13",depth:5},{value:"unlinkAccount()?",id:"unlinkaccount",depth:4},{value:"Parameters",id:"parameters-14",depth:5},{value:"Returns",id:"returns-14",depth:5},{value:"Todo",id:"todo-1",depth:5},{value:"updateAuthenticatorCounter()?",id:"updateauthenticatorcounter",depth:4},{value:"Parameters",id:"parameters-15",depth:5},{value:"Returns",id:"returns-15",depth:5},{value:"updateSession()?",id:"updatesession",depth:4},{value:"Parameters",id:"parameters-16",depth:5},{value:"Returns",id:"returns-16",depth:5},{value:"updateUser()?",id:"updateuser",depth:4},{value:"Parameters",id:"parameters-17",depth:5},{value:"Returns",id:"returns-17",depth:5},{value:"useVerificationToken()?",id:"useverificationtoken",depth:4},{value:"Parameters",id:"parameters-18",depth:5},{value:"Returns",id:"returns-18",depth:5},{value:"AdapterAccount",id:"adapteraccount",depth:2},{value:"Extends",id:"extends",depth:3},{value:"Properties",id:"properties",depth:3},{value:"access_token?",id:"access_token",depth:4},{value:"Inherited from",id:"inherited-from",depth:5},{value:"authorization_details?",id:"authorization_details",depth:4},{value:"Inherited from",id:"inherited-from-1",depth:5},{value:"expires_at?",id:"expires_at",depth:4},{value:"See",id:"see",depth:5},{value:"Inherited from",id:"inherited-from-2",depth:5},{value:"expires_in?",id:"expires_in",depth:4},{value:"Inherited from",id:"inherited-from-3",depth:5},{value:"id_token?",id:"id_token",depth:4},{value:"Inherited from",id:"inherited-from-4",depth:5},{value:"provider",id:"provider",depth:4},{value:"Inherited from",id:"inherited-from-5",depth:5},{value:"providerAccountId",id:"provideraccountid",depth:4},{value:"Inherited from",id:"inherited-from-6",depth:5},{value:"refresh_token?",id:"refresh_token",depth:4},{value:"Inherited from",id:"inherited-from-7",depth:5},{value:"scope?",id:"scope",depth:4},{value:"Inherited from",id:"inherited-from-8",depth:5},{value:"token_type?",id:"token_type",depth:4},{value:"Inherited from",id:"inherited-from-9",depth:5},{value:"type",id:"type",depth:4},{value:"Overrides",id:"overrides",depth:5},{value:"userId",id:"userid",depth:4},{value:"See",id:"see-1",depth:5},{value:"Overrides",id:"overrides-1",depth:5},{value:"AdapterAuthenticator",id:"adapterauthenticator",depth:2},{value:"Extends",id:"extends-1",depth:3},{value:"Properties",id:"properties-1",depth:3},{value:"counter",id:"counter",depth:4},{value:"Inherited from",id:"inherited-from-10",depth:5},{value:"credentialBackedUp",id:"credentialbackedup",depth:4},{value:"Inherited from",id:"inherited-from-11",depth:5},{value:"credentialDeviceType",id:"credentialdevicetype",depth:4},{value:"Inherited from",id:"inherited-from-12",depth:5},{value:"credentialID",id:"credentialid",depth:4},{value:"Inherited from",id:"inherited-from-13",depth:5},{value:"credentialPublicKey",id:"credentialpublickey",depth:4},{value:"Inherited from",id:"inherited-from-14",depth:5},{value:"providerAccountId",id:"provideraccountid-1",depth:4},{value:"Inherited from",id:"inherited-from-15",depth:5},{value:"transports?",id:"transports",depth:4},{value:"Inherited from",id:"inherited-from-16",depth:5},{value:"userId",id:"userid-1",depth:4},{value:"Overrides",id:"overrides-2",depth:5},{value:"AdapterSession",id:"adaptersession",depth:2},{value:"Properties",id:"properties-2",depth:3},{value:"expires",id:"expires",depth:4},{value:"sessionToken",id:"sessiontoken",depth:4},{value:"userId",id:"userid-2",depth:4},{value:"AdapterUser",id:"adapteruser",depth:2},{value:"Extends",id:"extends-2",depth:3},{value:"Properties",id:"properties-3",depth:3},{value:"email",id:"email",depth:4},{value:"Overrides",id:"overrides-3",depth:5},{value:"emailVerified",id:"emailverified",depth:4},{value:"id",id:"id",depth:4},{value:"Overrides",id:"overrides-4",depth:5},{value:"image?",id:"image",depth:4},{value:"Inherited from",id:"inherited-from-17",depth:5},{value:"name?",id:"name",depth:4},{value:"Inherited from",id:"inherited-from-18",depth:5},{value:"VerificationToken",id:"verificationtoken",depth:2},{value:"Properties",id:"properties-4",depth:3},{value:"expires",id:"expires-1",depth:4},{value:"identifier",id:"identifier",depth:4},{value:"token",id:"token",depth:4},{value:"AdapterAccountType",id:"adapteraccounttype",depth:2},{value:"isDate()",id:"isdate",depth:2},{value:"Parameters",id:"parameters-19",depth:3},{value:"Returns",id:"returns-19",depth:3}]}function x(e,i){throw Error("Expected "+(i?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}i.default=(0,n.c)(function(e){let{toc:i=o(e)}=e,s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",hr:"hr",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)(),...e.components};return a.m||x("$Tabs",!1),a.m.Tab||x("$Tabs.Tab",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h1,{children:"adapters"}),"\n",(0,t.jsxs)(s.p,{children:["Auth.js can be integrated with ",(0,t.jsx)(s.em,{children:"any"})," data layer (database, ORM, or backend API, HTTP client)\nin order to automatically create users, handle account linking automatically, support passwordless login,\nand to store session information."]}),"\n",(0,t.jsx)(s.p,{children:"This module contains utility functions and types to create an Auth.js compatible adapter."}),"\n",(0,t.jsxs)(s.p,{children:["Auth.js supports 2 session strategies to persist the login state of a user.\nThe default is to use a cookie + ",(0,t.jsx)(s.a,{href:"https://authjs.dev/concepts/session-strategies#jwt-session",children:"JWT"}),"\nbased session store (",(0,t.jsx)(s.code,{children:'strategy: "jwt"'}),"),\nbut you can also use a database adapter to store the session in a database."]}),"\n",(0,t.jsxs)(s.p,{children:["Before you continue, Auth.js has a list of ",(0,t.jsx)(s.a,{href:"https://adapters.authjs.dev",children:"official database adapters"}),". If your database is listed there, you\nprobably do not need to create your own. If you are using a data solution that cannot be integrated with an official adapter, this module will help you create a compatible adapter."]}),"\n",(0,t.jsx)(h.U,{type:"warning",children:(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Note"})," Although ",(0,t.jsx)(s.code,{children:"@auth/core"})," ",(0,t.jsx)(s.em,{children:"is"})," framework/runtime agnostic, an adapter might rely on a client/ORM package,\nthat is not yet compatible with your framework/runtime (e.g. it might rely on ",(0,t.jsx)(s.a,{href:"https://nodejs.org/docs/latest/api",children:"Node.js APIs"}),").\nRelated issues should be reported to the corresponding package maintainers."]})}),"\n",(0,t.jsx)(s.h2,{id:i[0].id,children:i[0].value}),"\n",(0,t.jsxs)(a.m,{items:["npm","pnpm","yarn","bun"],storageKey:"selectedPackageManager",children:[(0,t.jsx)(a.m.Tab,{children:(0,t.jsx)(s.pre,{icon:c.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"npm"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" install"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" @auth/core"})]})})})}),(0,t.jsx)(a.m.Tab,{children:(0,t.jsx)(s.pre,{icon:c.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"pnpm"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" add"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" @auth/core"})]})})})}),(0,t.jsx)(a.m.Tab,{children:(0,t.jsx)(s.pre,{icon:c.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"yarn"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" add"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" @auth/core"})]})})})}),(0,t.jsx)(a.m.Tab,{children:(0,t.jsx)(s.pre,{icon:c.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"bun"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" add"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" @auth/core"})]})})})})]}),"\n",(0,t.jsxs)(s.p,{children:["Then, you can import this submodule from ",(0,t.jsx)(s.code,{children:"@auth/core/adapters"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:i[1].id,children:i[1].value}),"\n",(0,t.jsxs)(s.p,{children:["Each adapter method and its function signature is documented in the ",(0,t.jsx)(s.a,{href:"adapters#adapter",children:"Adapter"})," interface."]}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsxs)(s.code,{children:[(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"import"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" { "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"type"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Adapter } "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"from"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "@auth/core/adapters"'})]}),"\n",(0,t.jsx)(s.span,{children:" "}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// 1. Simplest form, a plain object."})}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"export"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" const"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" MyAdapter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" Adapter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})]}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" // implement the adapter methods here"})}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"}"})}),"\n",(0,t.jsx)(s.span,{children:" "}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// or"})}),"\n",(0,t.jsx)(s.span,{children:" "}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// 2. A function that returns an object. Official adapters use this pattern."})}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"export"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" function"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" MyAdapter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"},children:"config"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" any"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" Adapter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})]}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" // Instantiate a client/ORM here with the provided config, or pass it in as a parameter."})}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" // Usually, you might already have a client instance elsewhere in your application,"})}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" // so you should only create a new instance if you need to or you don't have one."})}),"\n",(0,t.jsx)(s.span,{children:" "}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" return"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})]}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"   // implement the adapter methods"})}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" }"})}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"}"})}),"\n",(0,t.jsx)(s.span,{children:" "})]})}),"\n",(0,t.jsxs)(s.p,{children:["Then, you can pass your adapter to Auth.js as the ",(0,t.jsx)(s.code,{children:"adapter"})," option."]}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsxs)(s.code,{children:[(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"import"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" { MyAdapter } "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"from"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "./my-adapter"'})]}),"\n",(0,t.jsx)(s.span,{children:" "}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" response"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" await"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" Auth"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"..."}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:", {"})]}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  adapter: MyAdapter, "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// 1."})]}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"  // or"})}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  adapter: "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"MyAdapter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"({ "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"/* config */"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" }), "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// 2."})]}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"  ..."})}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"})"})})]})}),"\n",(0,t.jsx)(s.p,{children:"Note, you might be able to tweak an existing adapter to work with your data layer, instead of creating one from scratch."}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsxs)(s.code,{children:[(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"import"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" { "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"type"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Adapter } "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"from"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "@auth/core/adapters"'})]}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"import"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" { PrismaAdapter } "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"from"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "@auth/prisma-adapter"'})]}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"import"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" { PrismaClient } "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"from"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "@prisma/client"'})]}),"\n",(0,t.jsx)(s.span,{children:" "}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" prisma"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" new"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" PrismaClient"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"()"})]}),"\n",(0,t.jsx)(s.span,{children:" "}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" adapter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:":"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" Adapter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})]}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"  ..."}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"PrismaAdapter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(prisma),"})]}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"  // Add your custom methods here"})}),"\n",(0,t.jsx)(s.span,{children:(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"}"})}),"\n",(0,t.jsx)(s.span,{children:" "}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" request"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" new"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" Request"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"https://example.com"'}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"})]}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" response"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" await"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" Auth"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(request, { adapter, "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"..."}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" })"})]})]})}),"\n",(0,t.jsx)(s.h2,{id:i[2].id,children:i[2].value}),"\n",(0,t.jsx)(s.p,{children:"Auth.js can be used with any database. Models tell you what structures Auth.js expects from your database. Models will vary slightly depending on which adapter you use, but in general, will have a similar structure to the graph below. Each model can be extended with additional fields."}),"\n",(0,t.jsx)(h.U,{type:"info",children:(0,t.jsxs)(s.p,{children:["Auth.js / NextAuth.js uses ",(0,t.jsx)(s.code,{children:"camelCase"})," for its database rows while respecting the conventional ",(0,t.jsx)(s.code,{children:"snake_case"})," formatting for OAuth-related values. If the mixed casing is an issue for you, most adapters have a dedicated documentation section on how to force a casing convention."]})}),"\n",(0,t.jsx)(l.G,{chart:'erDiagram User ||--|{ Account : "" User { string id string name string email timestamp emailVerified string image } User ||--|{ Session : "" Session { string id timestamp expires string sessionToken string userId } Account { string id string userId string type string provider string providerAccountId string refresh_token string access_token int expires_at string token_type string scope string id_token string session_state } User ||--|{ VerificationToken : "" VerificationToken { string identifier string token timestamp expires }'}),"\n",(0,t.jsx)(s.h2,{id:i[3].id,children:i[3].value}),"\n",(0,t.jsxs)(s.p,{children:["There is a test suite ",(0,t.jsx)(s.a,{href:"https://github.com/nextauthjs/next-auth/blob/main/packages/utils/adapter.ts",children:"available"}),"\nto ensure that your adapter is compatible with Auth.js."]}),"\n",(0,t.jsx)(s.h2,{id:i[4].id,children:i[4].value}),"\n",(0,t.jsx)(s.p,{children:"The following are missing built-in features in Auth.js but can be solved in user land. If you would like to help implement these features, please reach out."}),"\n",(0,t.jsx)(s.h3,{id:i[5].id,children:i[5].value}),"\n",(0,t.jsxs)(s.p,{children:["Auth.js ",(0,t.jsx)(s.em,{children:"currently"})," does not support ",(0,t.jsxs)(s.a,{href:"https://authjs.dev/concepts/oauth",children:[(0,t.jsx)(s.code,{children:"access_token"})," rotation"]})," out of the box.\nThe necessary information (",(0,t.jsx)(s.code,{children:"refresh_token"}),", expiry, etc.) is being stored in the database, but the logic to rotate the token is not implemented\nin the core library.\n",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/refresh-token-rotation#database-strategy",children:"This guide"})," should provide the necessary steps to do this in user land."]}),"\n",(0,t.jsx)(s.h3,{id:i[6].id,children:i[6].value}),"\n",(0,t.jsxs)(s.p,{children:["Auth.js ",(0,t.jsx)(s.em,{children:"currently"})," does not support federated logout out of the box.\nThis means that even if an active session is deleted from the database, the user will still be signed in to the identity provider,\nthey will only be signed out of the application.\nEg. if you use Google as an identity provider, and you delete the session from the database,\nthe user will still be signed in to Google, but they will be signed out of your application."]}),"\n",(0,t.jsx)(s.p,{children:"If your users might be using the application from a publicly shared computer (eg: library), you might want to implement federated logout."}),"\n",(0,t.jsx)(s.h2,{id:i[7].id,children:i[7].value}),"\n",(0,t.jsx)(s.p,{children:"An adapter is an object with function properties (methods) that read and write data from a data source.\nThink of these methods as a way to normalize the data layer to common interfaces that Auth.js can understand."}),"\n",(0,t.jsx)(s.p,{children:"This is what makes Auth.js very flexible and allows it to be used with any data layer."}),"\n",(0,t.jsx)(s.p,{children:"The adapter methods are used to perform the following operations:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"Create/update/delete a user"}),"\n",(0,t.jsx)(s.li,{children:"Link/unlink an account to/from a user"}),"\n",(0,t.jsx)(s.li,{children:"Handle active sessions"}),"\n",(0,t.jsx)(s.li,{children:"Support passwordless authentication across multiple devices"}),"\n"]}),"\n",(0,t.jsx)(h.U,{type:"info",children:(0,t.jsx)(s.p,{children:"If any of the methods are not implemented, but are called by Auth.js,\nan error will be shown to the user and the operation will fail."})}),"\n",(0,t.jsx)(s.h3,{id:i[8].id,children:i[8].value}),"\n",(0,t.jsx)(s.h4,{id:i[9].id,children:i[9].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"createAuthenticator"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(authenticator): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"AdapterAuthenticator"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Create a new authenticator."}),"\n",(0,t.jsx)(s.p,{children:"If the creation fails, the adapter must throw an error."}),"\n",(0,t.jsx)(s.h5,{id:i[10].id,children:i[10].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"authenticator"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.a,{href:"adapters#adapterauthenticator",children:(0,t.jsx)(s.code,{children:"AdapterAuthenticator"})})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[11].id,children:i[11].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adapterauthenticator",children:(0,t.jsx)(s.code,{children:"AdapterAuthenticator"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[12].id,children:i[12].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"createSession"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(session): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"AdapterSession"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Creates a session for the user and returns it."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#database-session-management",children:"Database Session management"})]}),"\n",(0,t.jsx)(s.h5,{id:i[13].id,children:i[13].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsxs)(s.tbody,{children:[(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"session"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"Object"})})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"session.expires"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date",children:(0,t.jsx)(s.code,{children:"Date"})})})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"session.sessionToken"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"session.userId"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})]})]}),"\n",(0,t.jsx)(s.h5,{id:i[14].id,children:i[14].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adaptersession",children:(0,t.jsx)(s.code,{children:"AdapterSession"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[15].id,children:i[15].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"createUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(user): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"AdapterUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Creates a user in the database and returns it."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#user-management",children:"User management"})]}),"\n",(0,t.jsx)(s.h5,{id:i[16].id,children:i[16].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"user"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[17].id,children:i[17].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[18].id,children:i[18].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"createVerificationToken"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(verificationToken): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"undefined"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" VerificationToken"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Creates a verification token and returns it."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#verification-tokens",children:"Verification tokens"})]}),"\n",(0,t.jsx)(s.h5,{id:i[19].id,children:i[19].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"verificationToken"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.a,{href:"adapters#verificationtoken",children:(0,t.jsx)(s.code,{children:"VerificationToken"})})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[20].id,children:i[20].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"undefined"})," | ",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#verificationtoken",children:(0,t.jsx)(s.code,{children:"VerificationToken"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[21].id,children:i[21].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"deleteSession"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(sessionToken): "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"Promise"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<void>"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"undefined"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterSession"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Deletes a session from the database. It is preferred that this method also\nreturns the session that is being deleted for logging purposes."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#database-session-management",children:"Database Session management"})]}),"\n",(0,t.jsx)(s.h5,{id:i[22].id,children:i[22].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"sessionToken"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[23].id,children:i[23].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,t.jsx)(s.code,{children:"Promise"})}),"<",(0,t.jsx)(s.code,{children:"void"}),"> | ",(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"undefined"})," | ",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#adaptersession",children:(0,t.jsx)(s.code,{children:"AdapterSession"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[24].id,children:i[24].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"deleteUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(userId): "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"Promise"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<void>"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"undefined"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[25].id,children:i[25].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"userId"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[26].id,children:i[26].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,t.jsx)(s.code,{children:"Promise"})}),"<",(0,t.jsx)(s.code,{children:"void"}),"> | ",(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"undefined"})," | ",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})}),">"]}),"\n",(0,t.jsx)(s.h5,{id:i[27].id,children:i[27].value}),"\n",(0,t.jsx)(s.p,{children:"This method is currently not invoked yet."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#user-management",children:"User management"})]}),"\n",(0,t.jsx)(s.h4,{id:i[28].id,children:i[28].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"getAccount"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(providerAccountId, provider): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterAccount"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Get account by provider account id and provider."}),"\n",(0,t.jsxs)(s.p,{children:["If an account is not found, the adapter must return ",(0,t.jsx)(s.code,{children:"null"}),"."]}),"\n",(0,t.jsx)(s.h5,{id:i[29].id,children:i[29].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsxs)(s.tbody,{children:[(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"providerAccountId"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"provider"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})]})]}),"\n",(0,t.jsx)(s.h5,{id:i[30].id,children:i[30].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#adapteraccount",children:(0,t.jsx)(s.code,{children:"AdapterAccount"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[31].id,children:i[31].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"getAuthenticator"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(credentialID): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterAuthenticator"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Returns an authenticator from its credentialID."}),"\n",(0,t.jsxs)(s.p,{children:["If an authenticator is not found, the adapter must return ",(0,t.jsx)(s.code,{children:"null"}),"."]}),"\n",(0,t.jsx)(s.h5,{id:i[32].id,children:i[32].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"credentialID"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[33].id,children:i[33].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#adapterauthenticator",children:(0,t.jsx)(s.code,{children:"AdapterAuthenticator"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[34].id,children:i[34].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsxs)(s.code,{children:[(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"getSessionAndUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(sessionToken): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})]}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  session"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": AdapterSession;"})]}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"  user"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": AdapterUser;"})]}),"\n",(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"}"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})]})}),"\n",(0,t.jsx)(s.p,{children:"Returns a session and a userfrom the database in one go."}),"\n",(0,t.jsx)(h.U,{type:"default",children:(0,t.jsx)(s.p,{children:"If the database supports joins, it’s recommended to reduce the number of database queries."})}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#database-session-management",children:"Database Session management"})]}),"\n",(0,t.jsx)(s.h5,{id:i[35].id,children:i[35].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"sessionToken"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[36].id,children:i[36].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"null"})," | {\n",(0,t.jsx)(s.code,{children:"session"}),": ",(0,t.jsx)(s.a,{href:"adapters#adaptersession",children:(0,t.jsx)(s.code,{children:"AdapterSession"})}),";\n",(0,t.jsx)(s.code,{children:"user"}),": ",(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})}),";\n}>"]}),"\n",(0,t.jsx)(s.h4,{id:i[37].id,children:i[37].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"getUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(id): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Returns a user from the database via the user id."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#user-management",children:"User management"})]}),"\n",(0,t.jsx)(s.h5,{id:i[38].id,children:i[38].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"id"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[39].id,children:i[39].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[40].id,children:i[40].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"getUserByAccount"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(providerAccountId): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Using the provider id and the id of the user for a specific account, get the user."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#user-management",children:"User management"})]}),"\n",(0,t.jsx)(s.h5,{id:i[41].id,children:i[41].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"providerAccountId"})}),(0,t.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,t.jsx)(s.a,{href:"https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys",children:(0,t.jsx)(s.code,{children:"Pick"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adapteraccount",children:(0,t.jsx)(s.code,{children:"AdapterAccount"})}),", ",(0,t.jsx)(s.code,{children:'"provider"'})," | ",(0,t.jsx)(s.code,{children:'"providerAccountId"'}),">"]})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[42].id,children:i[42].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[43].id,children:i[43].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"getUserByEmail"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(email): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Returns a user from the database via the user’s email address."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#verification-tokens",children:"Verification tokens"})]}),"\n",(0,t.jsx)(s.h5,{id:i[44].id,children:i[44].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"email"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[45].id,children:i[45].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[46].id,children:i[46].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"linkAccount"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(account): "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"Promise"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<void>"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"undefined"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterAccount"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsxs)(s.p,{children:["This method is invoked internally (but optionally can be used for manual linking).\nIt creates an ",(0,t.jsx)(s.a,{href:"https://authjs.dev/reference/core/adapters#models",children:"Account"})," in the database."]}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#user-management",children:"User management"})]}),"\n",(0,t.jsx)(s.h5,{id:i[47].id,children:i[47].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"account"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.a,{href:"adapters#adapteraccount",children:(0,t.jsx)(s.code,{children:"AdapterAccount"})})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[48].id,children:i[48].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,t.jsx)(s.code,{children:"Promise"})}),"<",(0,t.jsx)(s.code,{children:"void"}),"> | ",(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"undefined"})," | ",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#adapteraccount",children:(0,t.jsx)(s.code,{children:"AdapterAccount"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[49].id,children:i[49].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"listAuthenticatorsByUserId"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(userId): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"AdapterAuthenticator[]"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Returns all authenticators from a user."}),"\n",(0,t.jsx)(s.p,{children:"If a user is not found, the adapter should still return an empty array.\nIf the retrieval fails for some other reason, the adapter must throw an error."}),"\n",(0,t.jsx)(s.h5,{id:i[50].id,children:i[50].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"userId"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[51].id,children:i[51].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adapterauthenticator",children:(0,t.jsx)(s.code,{children:"AdapterAuthenticator"})}),"[]>"]}),"\n",(0,t.jsx)(s.h4,{id:i[52].id,children:i[52].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"unlinkAccount"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(providerAccountId): "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"Promise"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<void>"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"undefined"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterAccount"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[53].id,children:i[53].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"providerAccountId"})}),(0,t.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,t.jsx)(s.a,{href:"https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys",children:(0,t.jsx)(s.code,{children:"Pick"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adapteraccount",children:(0,t.jsx)(s.code,{children:"AdapterAccount"})}),", ",(0,t.jsx)(s.code,{children:'"provider"'})," | ",(0,t.jsx)(s.code,{children:'"providerAccountId"'}),">"]})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[54].id,children:i[54].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",children:(0,t.jsx)(s.code,{children:"Promise"})}),"<",(0,t.jsx)(s.code,{children:"void"}),"> | ",(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"undefined"})," | ",(0,t.jsx)(s.a,{href:"adapters#adapteraccount",children:(0,t.jsx)(s.code,{children:"AdapterAccount"})}),">"]}),"\n",(0,t.jsx)(s.h5,{id:i[55].id,children:i[55].value}),"\n",(0,t.jsx)(s.p,{children:"This method is currently not invoked yet."}),"\n",(0,t.jsx)(s.h4,{id:i[56].id,children:i[56].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"updateAuthenticatorCounter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(credentialID, newCounter): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"AdapterAuthenticator"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Updates an authenticator’s counter."}),"\n",(0,t.jsx)(s.p,{children:"If the update fails, the adapter must throw an error."}),"\n",(0,t.jsx)(s.h5,{id:i[57].id,children:i[57].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsxs)(s.tbody,{children:[(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"credentialID"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"newCounter"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"number"})})]})]})]}),"\n",(0,t.jsx)(s.h5,{id:i[58].id,children:i[58].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adapterauthenticator",children:(0,t.jsx)(s.code,{children:"AdapterAuthenticator"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[59].id,children:i[59].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"updateSession"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(session): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"undefined"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" AdapterSession"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Updates a session in the database and returns it."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#database-session-management",children:"Database Session management"})]}),"\n",(0,t.jsx)(s.h5,{id:i[60].id,children:i[60].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"session"})}),(0,t.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,t.jsx)(s.a,{href:"https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype",children:(0,t.jsx)(s.code,{children:"Partial"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adaptersession",children:(0,t.jsx)(s.code,{children:"AdapterSession"})}),"> & ",(0,t.jsx)(s.a,{href:"https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys",children:(0,t.jsx)(s.code,{children:"Pick"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adaptersession",children:(0,t.jsx)(s.code,{children:"AdapterSession"})}),", ",(0,t.jsx)(s.code,{children:'"sessionToken"'}),">"]})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[61].id,children:i[61].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"undefined"})," | ",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#adaptersession",children:(0,t.jsx)(s.code,{children:"AdapterSession"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[62].id,children:i[62].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"updateUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(user): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"AdapterUser"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Updates a user in the database and returns it."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#user-management",children:"User management"})]}),"\n",(0,t.jsx)(s.h5,{id:i[63].id,children:i[63].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"user"})}),(0,t.jsxs)(s.td,{style:{textAlign:"left"},children:[(0,t.jsx)(s.a,{href:"https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype",children:(0,t.jsx)(s.code,{children:"Partial"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})}),"> & ",(0,t.jsx)(s.a,{href:"https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys",children:(0,t.jsx)(s.code,{children:"Pick"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})}),", ",(0,t.jsx)(s.code,{children:'"id"'}),">"]})]})})]}),"\n",(0,t.jsx)(s.h5,{id:i[64].id,children:i[64].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.a,{href:"adapters#adapteruser",children:(0,t.jsx)(s.code,{children:"AdapterUser"})}),">"]}),"\n",(0,t.jsx)(s.h4,{id:i[65].id,children:i[65].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"useVerificationToken"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(params): Awaitable"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" VerificationToken"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Return verification token from the database and deletes it\nso it can only be used once."}),"\n",(0,t.jsxs)(s.p,{children:["See also ",(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/creating-a-database-adapter#verification-tokens",children:"Verification tokens"})]}),"\n",(0,t.jsx)(s.h5,{id:i[66].id,children:i[66].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsxs)(s.tbody,{children:[(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"params"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"Object"})})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"params.identifier"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"params.token"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"string"})})]})]})]}),"\n",(0,t.jsx)(s.h5,{id:i[67].id,children:i[67].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#awaitablet",children:(0,t.jsx)(s.code,{children:"Awaitable"})}),"<",(0,t.jsx)(s.code,{children:"null"})," | ",(0,t.jsx)(s.a,{href:"adapters#verificationtoken",children:(0,t.jsx)(s.code,{children:"VerificationToken"})}),">"]}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.h2,{id:i[68].id,children:i[68].value}),"\n",(0,t.jsx)(s.p,{children:"An account is a connection between a user and a provider."}),"\n",(0,t.jsx)(s.p,{children:"There are two types of accounts:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"OAuth/OIDC accounts, which are created when a user signs in with an OAuth provider."}),"\n",(0,t.jsxs)(s.li,{children:["Email accounts, which are created when a user signs in with an ",(0,t.jsx)(s.a,{href:"https://authjs.dev/getting-started/authentication/email",children:"Email provider"}),"."]}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"One user can have multiple accounts."}),"\n",(0,t.jsx)(s.h3,{id:i[69].id,children:i[69].value}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})})}),"\n"]}),"\n",(0,t.jsx)(s.h3,{id:i[70].id,children:i[70].value}),"\n",(0,t.jsx)(s.h4,{id:i[71].id,children:i[71].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional readonly "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"access_token"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[72].id,children:i[72].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#access_token",children:(0,t.jsx)(s.code,{children:"access_token"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[73].id,children:i[73].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional readonly "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"authorization_details"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": AuthorizationDetails[];"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[74].id,children:i[74].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#authorization_details",children:(0,t.jsx)(s.code,{children:"authorization_details"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[75].id,children:i[75].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"expires_at"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": number;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Calculated value based on OAuth2TokenEndpointResponse.expires_in."}),"\n",(0,t.jsx)(s.p,{children:"It is the absolute timestamp (in seconds) when the OAuth2TokenEndpointResponse.access_token expires."}),"\n",(0,t.jsx)(s.p,{children:"This value can be used for implementing token rotation together with OAuth2TokenEndpointResponse.refresh_token."}),"\n",(0,t.jsx)(s.h5,{id:i[76].id,children:i[76].value}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"https://authjs.dev/guides/refresh-token-rotation#database-strategy",children:"https://authjs.dev/guides/refresh-token-rotation#database-strategy"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"https://www.rfc-editor.org/rfc/rfc6749#section-5.1",children:"https://www.rfc-editor.org/rfc/rfc6749#section-5.1"})}),"\n"]}),"\n",(0,t.jsx)(s.h5,{id:i[77].id,children:i[77].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#expires_at",children:(0,t.jsx)(s.code,{children:"expires_at"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[78].id,children:i[78].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional readonly "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"expires_in"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": number;"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[79].id,children:i[79].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#expires_in",children:(0,t.jsx)(s.code,{children:"expires_in"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[80].id,children:i[80].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional readonly "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"id_token"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[81].id,children:i[81].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#id_token",children:(0,t.jsx)(s.code,{children:"id_token"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[82].id,children:i[82].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"provider"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsxs)(s.p,{children:["Provider’s id for this account. E.g. “google”. See the full list at ",(0,t.jsx)(s.a,{href:"https://authjs.dev/reference/core/providers",children:"https://authjs.dev/reference/core/providers"})]}),"\n",(0,t.jsx)(s.h5,{id:i[83].id,children:i[83].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#provider",children:(0,t.jsx)(s.code,{children:"provider"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[84].id,children:i[84].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"providerAccountId"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"This value depends on the type of the provider being used to create the account."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["oauth/oidc: The OAuth account’s id, returned from the ",(0,t.jsx)(s.code,{children:"profile()"})," callback."]}),"\n",(0,t.jsx)(s.li,{children:"email: The user’s email address."}),"\n",(0,t.jsxs)(s.li,{children:["credentials: ",(0,t.jsx)(s.code,{children:"id"})," returned from the ",(0,t.jsx)(s.code,{children:"authorize()"})," callback"]}),"\n"]}),"\n",(0,t.jsx)(s.h5,{id:i[85].id,children:i[85].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#provideraccountid",children:(0,t.jsx)(s.code,{children:"providerAccountId"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[86].id,children:i[86].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional readonly "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"refresh_token"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[87].id,children:i[87].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#refresh_token",children:(0,t.jsx)(s.code,{children:"refresh_token"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[88].id,children:i[88].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional readonly "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"scope"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[89].id,children:i[89].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#scope",children:(0,t.jsx)(s.code,{children:"scope"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[90].id,children:i[90].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional readonly "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"token_type"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Lowercase"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"string"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:">"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]})})}),"\n",(0,t.jsx)(s.p,{children:"NOTE: because the value is case insensitive it is always returned lowercased"}),"\n",(0,t.jsx)(s.h5,{id:i[91].id,children:i[91].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#token_type",children:(0,t.jsx)(s.code,{children:"token_type"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[92].id,children:i[92].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"type"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": AdapterAccountType;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Provider’s type for this account"}),"\n",(0,t.jsx)(s.h5,{id:i[93].id,children:i[93].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#type",children:(0,t.jsx)(s.code,{children:"type"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[94].id,children:i[94].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"userId"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"id of the user this account belongs to"}),"\n",(0,t.jsx)(s.h5,{id:i[95].id,children:i[95].value}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.a,{href:"https://authjs.dev/reference/core/adapters#adapteruser",children:"https://authjs.dev/reference/core/adapters#adapteruser"})}),"\n",(0,t.jsx)(s.h5,{id:i[96].id,children:i[96].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#account",children:(0,t.jsx)(s.code,{children:"Account"})}),".",(0,t.jsx)(s.a,{href:"types#userid",children:(0,t.jsx)(s.code,{children:"userId"})})]}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.h2,{id:i[97].id,children:i[97].value}),"\n",(0,t.jsx)(s.p,{children:"An authenticator represents a credential authenticator assigned to a user."}),"\n",(0,t.jsx)(s.h3,{id:i[98].id,children:i[98].value}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"types#authenticator",children:(0,t.jsx)(s.code,{children:"Authenticator"})})}),"\n"]}),"\n",(0,t.jsx)(s.h3,{id:i[99].id,children:i[99].value}),"\n",(0,t.jsx)(s.h4,{id:i[100].id,children:i[100].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"counter"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": number;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Number of times the authenticator has been used."}),"\n",(0,t.jsx)(s.h5,{id:i[101].id,children:i[101].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#authenticator",children:(0,t.jsx)(s.code,{children:"Authenticator"})}),".",(0,t.jsx)(s.a,{href:"types#counter",children:(0,t.jsx)(s.code,{children:"counter"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[102].id,children:i[102].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"credentialBackedUp"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": boolean;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Whether the client authenticator backed up the credential."}),"\n",(0,t.jsx)(s.h5,{id:i[103].id,children:i[103].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#authenticator",children:(0,t.jsx)(s.code,{children:"Authenticator"})}),".",(0,t.jsx)(s.a,{href:"types#credentialbackedup",children:(0,t.jsx)(s.code,{children:"credentialBackedUp"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[104].id,children:i[104].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"credentialDeviceType"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Device type of the authenticator."}),"\n",(0,t.jsx)(s.h5,{id:i[105].id,children:i[105].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#authenticator",children:(0,t.jsx)(s.code,{children:"Authenticator"})}),".",(0,t.jsx)(s.a,{href:"types#credentialdevicetype",children:(0,t.jsx)(s.code,{children:"credentialDeviceType"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[106].id,children:i[106].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"credentialID"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Base64 encoded credential ID."}),"\n",(0,t.jsx)(s.h5,{id:i[107].id,children:i[107].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#authenticator",children:(0,t.jsx)(s.code,{children:"Authenticator"})}),".",(0,t.jsx)(s.a,{href:"types#credentialid",children:(0,t.jsx)(s.code,{children:"credentialID"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[108].id,children:i[108].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"credentialPublicKey"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Base64 encoded credential public key."}),"\n",(0,t.jsx)(s.h5,{id:i[109].id,children:i[109].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#authenticator",children:(0,t.jsx)(s.code,{children:"Authenticator"})}),".",(0,t.jsx)(s.a,{href:"types#credentialpublickey",children:(0,t.jsx)(s.code,{children:"credentialPublicKey"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[110].id,children:i[110].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"providerAccountId"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"The provider account ID connected to the authenticator."}),"\n",(0,t.jsx)(s.h5,{id:i[111].id,children:i[111].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#authenticator",children:(0,t.jsx)(s.code,{children:"Authenticator"})}),".",(0,t.jsx)(s.a,{href:"types#provideraccountid-1",children:(0,t.jsx)(s.code,{children:"providerAccountId"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[112].id,children:i[112].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"transports"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Concatenated transport flags."}),"\n",(0,t.jsx)(s.h5,{id:i[113].id,children:i[113].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#authenticator",children:(0,t.jsx)(s.code,{children:"Authenticator"})}),".",(0,t.jsx)(s.a,{href:"types#transports",children:(0,t.jsx)(s.code,{children:"transports"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[114].id,children:i[114].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"userId"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"User ID of the authenticator."}),"\n",(0,t.jsx)(s.h5,{id:i[115].id,children:i[115].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#authenticator",children:(0,t.jsx)(s.code,{children:"Authenticator"})}),".",(0,t.jsx)(s.a,{href:"types#userid-1",children:(0,t.jsx)(s.code,{children:"userId"})})]}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.h2,{id:i[116].id,children:i[116].value}),"\n",(0,t.jsx)(s.p,{children:"A session holds information about a user’s current signin state."}),"\n",(0,t.jsx)(s.h3,{id:i[117].id,children:i[117].value}),"\n",(0,t.jsx)(s.h4,{id:i[118].id,children:i[118].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"expires"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Date;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"The absolute date when the session expires."}),"\n",(0,t.jsxs)(s.p,{children:["If a session is accessed prior to its expiry date,\nit will be extended based on the ",(0,t.jsx)(s.code,{children:"maxAge"})," option as defined in by ",(0,t.jsx)(s.code,{children:"SessionOptions.maxAge"}),".\nIt is never extended more than once in a period defined by ",(0,t.jsx)(s.code,{children:"SessionOptions.updateAge"}),"."]}),"\n",(0,t.jsx)(s.p,{children:"If a session is accessed past its expiry date,\nit will be removed from the database to clean up inactive sessions."}),"\n",(0,t.jsx)(s.h4,{id:i[119].id,children:i[119].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"sessionToken"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsxs)(s.p,{children:["A randomly generated value that is used to look up the session in the database\nwhen using ",(0,t.jsx)(s.code,{children:'"database"'})," ",(0,t.jsx)(s.code,{children:"AuthConfig.strategy"})," option.\nThis value is saved in a secure, HTTP-Only cookie on the client."]}),"\n",(0,t.jsx)(s.h4,{id:i[120].id,children:i[120].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"userId"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"Connects the active session to a user in the database"}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.h2,{id:i[121].id,children:i[121].value}),"\n",(0,t.jsx)(s.p,{children:"A user represents a person who can sign in to the application.\nIf a user does not exist yet, it will be created when they sign in for the first time,\nusing the information (profile data) returned by the identity provider.\nA corresponding account is also created and linked to the user."}),"\n",(0,t.jsx)(s.h3,{id:i[122].id,children:i[122].value}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"types#user-2",children:(0,t.jsx)(s.code,{children:"User"})})}),"\n"]}),"\n",(0,t.jsx)(s.h3,{id:i[123].id,children:i[123].value}),"\n",(0,t.jsx)(s.h4,{id:i[124].id,children:i[124].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"email"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"The user’s email address."}),"\n",(0,t.jsx)(s.h5,{id:i[125].id,children:i[125].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#user-2",children:(0,t.jsx)(s.code,{children:"User"})}),".",(0,t.jsx)(s.a,{href:"types#email-1",children:(0,t.jsx)(s.code,{children:"email"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[126].id,children:i[126].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"emailVerified"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" Date;"})]})})}),"\n",(0,t.jsxs)(s.p,{children:["Whether the user has verified their email address via an ",(0,t.jsx)(s.a,{href:"https://authjs.dev/getting-started/authentication/email",children:"Email provider"}),".\nIt is ",(0,t.jsx)(s.code,{children:"null"})," if the user has not signed in with the Email provider yet, or the date of the first successful signin."]}),"\n",(0,t.jsx)(s.h4,{id:i[127].id,children:i[127].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"id"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"A unique identifier for the user."}),"\n",(0,t.jsx)(s.h5,{id:i[128].id,children:i[128].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#user-2",children:(0,t.jsx)(s.code,{children:"User"})}),".",(0,t.jsx)(s.a,{href:"types#id-2",children:(0,t.jsx)(s.code,{children:"id"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[129].id,children:i[129].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"image"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" string;"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[130].id,children:i[130].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#user-2",children:(0,t.jsx)(s.code,{children:"User"})}),".",(0,t.jsx)(s.a,{href:"types#image",children:(0,t.jsx)(s.code,{children:"image"})})]}),"\n",(0,t.jsx)(s.h4,{id:i[131].id,children:i[131].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"optional "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"name"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" string;"})]})})}),"\n",(0,t.jsx)(s.h5,{id:i[132].id,children:i[132].value}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.a,{href:"types#user-2",children:(0,t.jsx)(s.code,{children:"User"})}),".",(0,t.jsx)(s.a,{href:"types#name-3",children:(0,t.jsx)(s.code,{children:"name"})})]}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.h2,{id:i[133].id,children:i[133].value}),"\n",(0,t.jsxs)(s.p,{children:["A verification token is a temporary token that is used to sign in a user via their email address.\nIt is created when a user signs in with an ",(0,t.jsx)(s.a,{href:"https://authjs.dev/getting-started/authentication/email",children:"Email provider"}),".\nWhen the user clicks the link in the email, the token and email is sent back to the server\nwhere it is hashed and compared to the value in the database.\nIf the tokens and emails match, and the token hasn’t expired yet, the user is signed in.\nThe token is then deleted from the database."]}),"\n",(0,t.jsx)(s.h3,{id:i[134].id,children:i[134].value}),"\n",(0,t.jsx)(s.h4,{id:i[135].id,children:i[135].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"expires"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Date;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"The absolute date when the token expires."}),"\n",(0,t.jsx)(s.h4,{id:i[136].id,children:i[136].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"identifier"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"The user’s email address."}),"\n",(0,t.jsx)(s.h4,{id:i[137].id,children:i[137].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"token"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": string;"})]})})}),"\n",(0,t.jsxs)(s.p,{children:["A ",(0,t.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/Hash_function",children:"hashed"})," token, using the ",(0,t.jsx)(s.code,{children:"AuthConfig.secret"})," value."]}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.h2,{id:i[138].id,children:i[138].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"type"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" AdapterAccountType"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": Extract<"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"ProviderType"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:", "}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"oauth"'}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "oidc"'}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "email"'}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "webauthn"'}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:">;"})]})})}),"\n",(0,t.jsx)(s.p,{children:"The type of account."}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.h2,{id:i[139].id,children:i[139].value}),"\n",(0,t.jsx)(s.pre,{icon:c.KP,tabIndex:"0","data-language":"ts","data-word-wrap":"","data-copy":"",children:(0,t.jsx)(s.code,{children:(0,t.jsxs)(s.span,{children:[(0,t.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"isDate"}),(0,t.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(value): any"})]})})}),"\n",(0,t.jsx)(s.h3,{id:i[140].id,children:i[140].value}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Parameter"}),(0,t.jsx)(s.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,t.jsx)(s.tbody,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"value"})}),(0,t.jsx)(s.td,{style:{textAlign:"left"},children:(0,t.jsx)(s.code,{children:"any"})})]})})]}),"\n",(0,t.jsx)(s.h3,{id:i[141].id,children:i[141].value}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.code,{children:"any"})})]})},"/reference/core/adapters",{filePath:"pages/reference/core/adapters.mdx",pageMap:r.v,frontMatter:{},title:"adapters"},"undefined"==typeof RemoteContent?o:RemoteContent.useTOC)},82732:function(e,i,s){"use strict";s.d(i,{U:function(){return l}});var t=s(651),n=s(69577),r=s(74661);let d={default:"\uD83D\uDCA1",error:"\uD83D\uDEAB",info:(0,t.jsx)(r.AV,{className:"_mt-1"}),warning:"⚠️"},a={default:(0,n.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,n.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,n.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,n.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 l({children:e,type:i="default",emoji:s=d[i]}){return(0,t.jsxs)("div",{className:(0,n.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",a[i]),children:[(0,t.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,t.jsx)("div",{className:"_w-full _min-w-0 _leading-7",children:e})]})}},29920:function(e,i,s){"use strict";let t,n,r;s.d(i,{m:function(){return W}});var d=s(651),a=s(11263),l=s(68662),h=s(92379),c=s(71452),o=s(45542),x=s(76192),p=s(72099),j=s(70207),k=s(50827),u=s(87327);function g({onFocus:e}){let i;let[s,t]=(0,h.useState)(!0),n=(i=(0,h.useRef)(!1),(0,x.e)(()=>(i.current=!0,()=>{i.current=!1}),[]),i);return s?h.createElement(u._,{as:"button",type:"button",features:u.x.Focusable,onFocus:i=>{i.preventDefault();let s,r=50;s=requestAnimationFrame(function i(){if(r--<=0){s&&cancelAnimationFrame(s);return}if(e()){if(cancelAnimationFrame(s),!n.current)return;t(!1);return}s=requestAnimationFrame(i)})}}):null}var y=s(35873),E=s(20237),f=s(76939),v=s(46751),A=s(10138);let b=h.createContext(null);function m({children:e}){let i=h.useRef({groups:new Map,get(e,i){var s;let t=this.groups.get(e);t||(t=new Map,this.groups.set(e,t));let n=null!=(s=t.get(i))?s:0;return t.set(i,n+1),[Array.from(t.keys()).indexOf(i),function(){let e=t.get(i);e>1?t.set(i,e-1):t.delete(i)}]}});return h.createElement(b.Provider,{value:i},e)}function F(e){let i=h.useContext(b);if(!i)throw Error("You must wrap your component in a <StableCollection>");let s=h.useId(),[t,n]=i.current.get(e,s);return h.useEffect(()=>n,[]),t}var w=s(80579),C=((t=C||{})[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t),I=((n=I||{})[n.Less=-1]="Less",n[n.Equal=0]="Equal",n[n.Greater=1]="Greater",n),D=((r=D||{})[r.SetSelectedIndex=0]="SetSelectedIndex",r[r.RegisterTab=1]="RegisterTab",r[r.UnregisterTab=2]="UnregisterTab",r[r.RegisterPanel=3]="RegisterPanel",r[r.UnregisterPanel=4]="UnregisterPanel",r);let P={0(e,i){var s;let t=(0,y.z2)(e.tabs,e=>e.current),n=(0,y.z2)(e.panels,e=>e.current),r=t.filter(e=>{var i;return!(null!=(i=e.current)&&i.hasAttribute("disabled"))}),d={...e,tabs:t,panels:n};if(i.index<0||i.index>t.length-1){let s=(0,E.E)(Math.sign(i.index-e.selectedIndex),{[-1]:()=>1,0:()=>(0,E.E)(Math.sign(i.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===r.length)return d;let n=(0,E.E)(s,{0:()=>t.indexOf(r[0]),1:()=>t.indexOf(r[r.length-1])});return{...d,selectedIndex:-1===n?e.selectedIndex:n}}let a=t.slice(0,i.index),l=[...t.slice(i.index),...a].find(e=>r.includes(e));if(!l)return d;let h=null!=(s=t.indexOf(l))?s:e.selectedIndex;return -1===h&&(h=e.selectedIndex),{...d,selectedIndex:h}},1(e,i){if(e.tabs.includes(i.tab))return e;let s=e.tabs[e.selectedIndex],t=(0,y.z2)([...e.tabs,i.tab],e=>e.current),n=e.selectedIndex;return e.info.current.isControlled||-1===(n=t.indexOf(s))&&(n=e.selectedIndex),{...e,tabs:t,selectedIndex:n}},2:(e,i)=>({...e,tabs:e.tabs.filter(e=>e!==i.tab)}),3:(e,i)=>e.panels.includes(i.panel)?e:{...e,panels:(0,y.z2)([...e.panels,i.panel],e=>e.current)},4:(e,i)=>({...e,panels:e.panels.filter(e=>e!==i.panel)})},T=(0,h.createContext)(null);function _(e){let i=(0,h.useContext)(T);if(null===i){let i=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,_),i}return i}T.displayName="TabsDataContext";let B=(0,h.createContext)(null);function S(e){let i=(0,h.useContext)(B);if(null===i){let i=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,S),i}return i}function U(e,i){return(0,E.E)(i.type,P,e,i)}B.displayName="TabsActionsContext";let R=A.VN.RenderStrategy|A.VN.Static,K=(0,A.yV)(function(e,i){var s,t;let n=(0,h.useId)(),{id:r=`headlessui-tabs-tab-${n}`,disabled:d=!1,autoFocus:p=!1,...u}=e,{orientation:g,activation:b,selectedIndex:m,tabs:C,panels:I}=_("Tab"),D=S("Tab"),P=_("Tab"),[T,B]=(0,h.useState)(null),U=(0,h.useRef)(null),R=(0,k.T)(U,i,B);(0,x.e)(()=>D.registerTab(U),[D,U]);let K=F("tabs"),O=C.indexOf(U);-1===O&&(O=K);let N=O===m,M=(0,o.z)(e=>{var i;let s=e();if(s===y.fE.Success&&"auto"===b){let e=null==(i=(0,v.r)(U))?void 0:i.activeElement,s=P.tabs.findIndex(i=>i.current===e);-1!==s&&D.change(s)}return s}),V=(0,o.z)(e=>{let i=C.map(e=>e.current).filter(Boolean);if(e.key===w.R.Space||e.key===w.R.Enter){e.preventDefault(),e.stopPropagation(),D.change(O);return}switch(e.key){case w.R.Home:case w.R.PageUp:return e.preventDefault(),e.stopPropagation(),M(()=>(0,y.jA)(i,y.TO.First));case w.R.End:case w.R.PageDown:return e.preventDefault(),e.stopPropagation(),M(()=>(0,y.jA)(i,y.TO.Last))}if(M(()=>(0,E.E)(g,{vertical:()=>e.key===w.R.ArrowUp?(0,y.jA)(i,y.TO.Previous|y.TO.WrapAround):e.key===w.R.ArrowDown?(0,y.jA)(i,y.TO.Next|y.TO.WrapAround):y.fE.Error,horizontal:()=>e.key===w.R.ArrowLeft?(0,y.jA)(i,y.TO.Previous|y.TO.WrapAround):e.key===w.R.ArrowRight?(0,y.jA)(i,y.TO.Next|y.TO.WrapAround):y.fE.Error}))===y.fE.Success)return e.preventDefault()}),z=(0,h.useRef)(!1),G=(0,o.z)(()=>{var e;z.current||(z.current=!0,null==(e=U.current)||e.focus({preventScroll:!0}),D.change(O),(0,f.Y)(()=>{z.current=!1}))}),L=(0,o.z)(e=>{e.preventDefault()}),{isFocusVisible:W,focusProps:q}=(0,a.F)({autoFocus:p}),{isHovered:H,hoverProps:Y}=(0,l.X)({isDisabled:d}),{pressed:Z,pressProps:J}=(0,c.x)({disabled:d}),$=(0,h.useMemo)(()=>({selected:N,hover:H,active:Z,focus:W,autofocus:p,disabled:d}),[N,H,W,Z,p,d]),X=(0,A.dG)({ref:R,onKeyDown:V,onMouseDown:L,onClick:G,id:r,role:"tab",type:(0,j.f)(e,T),"aria-controls":null==(t=null==(s=I[O])?void 0:s.current)?void 0:t.id,"aria-selected":N,tabIndex:N?0:-1,disabled:d||void 0,autoFocus:p},q,Y,J);return(0,A.sY)({ourProps:X,theirProps:u,slot:$,defaultTag:"button",name:"Tabs.Tab"})}),O=(0,A.yV)(function(e,i){let{defaultIndex:s=0,vertical:t=!1,manual:n=!1,onChange:r,selectedIndex:d=null,...a}=e,l=t?"vertical":"horizontal",c=n?"manual":"auto",j=null!==d,u=(0,p.E)({isControlled:j}),E=(0,k.T)(i),[f,v]=(0,h.useReducer)(U,{info:u,selectedIndex:null!=d?d:s,tabs:[],panels:[]}),b=(0,h.useMemo)(()=>({selectedIndex:f.selectedIndex}),[f.selectedIndex]),F=(0,p.E)(r||(()=>{})),w=(0,p.E)(f.tabs),C=(0,h.useMemo)(()=>({orientation:l,activation:c,...f}),[l,c,f]),I=(0,o.z)(e=>(v({type:1,tab:e}),()=>v({type:2,tab:e}))),D=(0,o.z)(e=>(v({type:3,panel:e}),()=>v({type:4,panel:e}))),P=(0,o.z)(e=>{_.current!==e&&F.current(e),j||v({type:0,index:e})}),_=(0,p.E)(j?e.selectedIndex:f.selectedIndex),S=(0,h.useMemo)(()=>({registerTab:I,registerPanel:D,change:P}),[]);return(0,x.e)(()=>{v({type:0,index:null!=d?d:s})},[d]),(0,x.e)(()=>{if(void 0===_.current||f.tabs.length<=0)return;let e=(0,y.z2)(f.tabs,e=>e.current);e.some((e,i)=>f.tabs[i]!==e)&&P(e.indexOf(f.tabs[_.current]))}),h.createElement(m,null,h.createElement(B.Provider,{value:S},h.createElement(T.Provider,{value:C},C.tabs.length<=0&&h.createElement(g,{onFocus:()=>{var e,i;for(let s of w.current)if((null==(e=s.current)?void 0:e.tabIndex)===0)return null==(i=s.current)||i.focus(),!0;return!1}}),(0,A.sY)({ourProps:{ref:E},theirProps:a,slot:b,defaultTag:"div",name:"Tabs"}))))}),N=(0,A.yV)(function(e,i){let{orientation:s,selectedIndex:t}=_("Tab.List"),n=(0,k.T)(i),r=(0,h.useMemo)(()=>({selectedIndex:t}),[t]);return(0,A.sY)({ourProps:{ref:n,role:"tablist","aria-orientation":s},theirProps:e,slot:r,defaultTag:"div",name:"Tabs.List"})}),M=(0,A.yV)(function(e,i){let{selectedIndex:s}=_("Tab.Panels"),t=(0,k.T)(i),n=(0,h.useMemo)(()=>({selectedIndex:s}),[s]);return(0,A.sY)({ourProps:{ref:t},theirProps:e,slot:n,defaultTag:"div",name:"Tabs.Panels"})}),V=(0,A.yV)(function(e,i){var s,t,n,r;let d=(0,h.useId)(),{id:l=`headlessui-tabs-panel-${d}`,tabIndex:c=0,...o}=e,{selectedIndex:p,tabs:j,panels:g}=_("Tab.Panel"),y=S("Tab.Panel"),E=(0,h.useRef)(null),f=(0,k.T)(E,i);(0,x.e)(()=>y.registerPanel(E),[y,E]);let v=F("panels"),b=g.indexOf(E);-1===b&&(b=v);let m=b===p,{isFocusVisible:w,focusProps:C}=(0,a.F)(),I=(0,h.useMemo)(()=>({selected:m,focus:w}),[m,w]),D=(0,A.dG)({ref:f,id:l,role:"tabpanel","aria-labelledby":null==(t=null==(s=j[b])?void 0:s.current)?void 0:t.id,tabIndex:m?c:-1},C);return m||null!=(n=o.unmount)&&!n||null!=(r=o.static)&&r?(0,A.sY)({ourProps:D,theirProps:o,slot:I,defaultTag:"div",features:R,visible:m,name:"Tabs.Panel"}):h.createElement(u._,{"aria-hidden":"true",...D})}),z=Object.assign(K,{Group:O,List:N,Panels:M,Panel:V});var G=s(69577);function L(e){return!!e&&"object"==typeof e&&"label"in e}let W=Object.assign(function({items:e,selectedIndex:i,defaultIndex:s=0,onChange:t,children:n,storageKey:r}){let[a,l]=(0,h.useState)(s);(0,h.useEffect)(()=>{void 0!==i&&l(i)},[i]),(0,h.useEffect)(()=>{if(!r)return;function e(e){e.key===r&&l(Number(e.newValue))}let i=Number(localStorage.getItem(r));return l(Number.isNaN(i)?0:i),window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}},[]);let c=(0,h.useCallback)(e=>{if(r){let i=String(e);localStorage.setItem(r,i),window.dispatchEvent(new StorageEvent("storage",{key:r,newValue:i}));return}l(e),t?.(e)},[]);return(0,d.jsxs)(O,{selectedIndex:a,defaultIndex:s,onChange:c,tabIndex:-1,children:[(0,d.jsx)(N,{className:(0,G.Z)("nextra-scrollbar _overflow-x-auto _overscroll-x-contain _overflow-y-hidden","_mt-4 _flex _w-full _gap-2 _border-b _border-gray-200 _pb-px dark:_border-neutral-800"),children:e.map((e,i)=>(0,d.jsx)(z,{disabled:L(e)&&e.disabled,className:(0,G.Z)("_ring-inset","_rounded-t _p-2 _font-medium _leading-5 _transition-colors","_-mb-0.5 _select-none _border-b-2","data-[selected]:!_border-current data-[selected]:!_text-primary-600","_border-transparent _text-gray-600 hover:_border-gray-200 hover:_text-black dark:_text-gray-200 dark:hover:_border-neutral-800 dark:hover:_text-white","disabled:_pointer-events-none disabled:_text-gray-400 disabled:dark:_text-neutral-600"),children:L(e)?e.label:e},i))}),(0,d.jsx)(M,{children:n})]})},{displayName:"Tabs",Tab:function({children:e,unmount:i=!1,...s}){return(0,d.jsx)(V,{...s,unmount:i,className:"_rounded _mt-6",children:e})}})},45013:function(e,i,s){"use strict";s.d(i,{G:function(){return r}});var t=s(651),n=s(92379);function r({chart:e}){let i=(0,n.useId)(),[r,d]=(0,n.useState)(""),a=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let t=document.documentElement,n=new MutationObserver(r);return n.observe(t,{attributes:!0}),r(),()=>{n.disconnect()};async function r(){let n=t.classList.contains("dark")||t.attributes.getNamedItem("data-theme")?.value==="dark",{default:r}=await s.e(95453).then(s.bind(s,95453));try{r.initialize({startOnLoad:!1,securityLevel:"loose",fontFamily:"inherit",themeCSS:"margin: 1.5rem auto 0;",theme:n?"dark":"default"});let{svg:s}=await r.render(i.replaceAll(":",""),e,a.current||void 0);d(s)}catch(e){console.error("Error while rendering mermaid",e)}}},[e]),(0,t.jsx)("div",{ref:a,dangerouslySetInnerHTML:{__html:r}})}}},function(e){e.O(0,[64464,46635,92888,49774,40179],function(){return e(e.s=83839)}),_N_E=e.O()}]);