mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-27 09:32:20 -05:00
docs: fixed demo code error in concepts/plugins. (#641)
This commit is contained in:
@@ -194,8 +194,7 @@ import { createAuthMiddleware } from "better-auth/plugins";
|
||||
const myPlugin = {
|
||||
id: "my-plugin",
|
||||
hooks: {
|
||||
before: {
|
||||
[{
|
||||
before: [{
|
||||
matcher: (context)=>{
|
||||
return context.headers.get("x-my-header") === "my-value"
|
||||
},
|
||||
@@ -205,8 +204,7 @@ const myPlugin = {
|
||||
context: ctx // if you want to modify the context
|
||||
}
|
||||
})
|
||||
}]
|
||||
},
|
||||
}],
|
||||
after: [{
|
||||
matcher: (context)=>{
|
||||
return context.req.method === "POST
|
||||
|
||||
Reference in New Issue
Block a user