remakker
BABetter Auth
•Created by remakker on 3/21/2025 in #help
ctx.redirect not working?
When the user is signing in, I want to check for something in the additional fields and redirect based on that. But even this simple redirect script doesn't seem to work.
3 replies
BABetter Auth
•Created by remakker on 1/21/2025 in #help
Type mismatch between auth.api.getSession and typeof user.$inferSelect
I have a backend server with express and drizzle.
I get the type of the userTable with
typeof user.$inferSelect
This type is different from the type of session.user
that returns from auth.api.getSession
.
Is there a way to remove the undefined from the type getSession().user?1 replies
BABetter Auth
•Created by remakker on 1/20/2025 in #help
Server additionalFields Error
When following this example from the docs: https://www.better-auth.com/docs/concepts/database#extending-core-schema, I get a few errors, based on the request I send.
If i execute this I get
Where is this going wrong?
ROLE_IS_REQUIRED
error, but there was no Typescript error, which is not good. Also why do I get this error if I have defined a default value in my auth instance?
When I execute this request, I get a long error, with this message: SQLite error: NOT NULL constraint failed: user.role
,Where is this going wrong?
6 replies