Database Hooks `before.create` Has Undefined Context
How is the context populated in the database before create hook?
Taken from example here https://www.better-auth.com/docs/concepts/database#1-before-hook
Code snippet below:
Database | Better Auth
Learn how to use a database with Better Auth.
4 Replies
It depends on how a given session was created, in some cases there can be no ctx.
Yeah I see the parameter type as
GenericEndpointContext | undefined
. I'm trying to get the context during signup with oauth in the /callback/:id
path.I see, I'll look into the source code and see if I can add ctx.
Sounds good, thank you.