docs(fix); sessionMiddleware import path in plugins docs (#1544)

Thanks @perkinsjr !
This commit is contained in:
Maxwell
2025-02-23 15:46:47 +10:00
committed by Bereket Engida
parent df50012a76
commit c7ed3b5565

View File

@@ -391,7 +391,8 @@ const myPlugin = {
A middleware that checks if the client has a valid session. If the client has a valid session, it'll add the session data to the context object. A middleware that checks if the client has a valid session. If the client has a valid session, it'll add the session data to the context object.
```ts title="plugin.ts" ```ts title="plugin.ts"
import { createAuthMiddleware, sessionMiddleware } from "better-auth/plugins"; import { createAuthMiddleware } from "better-auth/plugins";
import { sessionMiddleware } from "better-auth/api";
const myPlugin = ()=>{ const myPlugin = ()=>{
return { return {