mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 04:19:32 +00:00
docs(fix); sessionMiddleware import path in plugins docs (#1544)
Thanks @perkinsjr !
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user