Disable some of the default endpoints
is there a way to disable some of the default endpoints?
for example i want to use all better-auth endpoints apart from the sign-up because i want to have a custom one.
3 Replies
You can pass
disabledPaths
in the auth config:
https://www.better-auth.com/docs/reference/options#disabledpathsOptions | Better Auth
Better Auth configuration options reference.
@Ping what about this idea:
i want to use the enpoint function of better-auth (with the parameters and all) and update it with additional code.
basically what i'm trying to do is an invitation only where admins are the only one that can send an invitation
Sure, it's do-able, you'll need to look into hooks and check if a request is hitting the sign-up method, then run checks and see if the email is part of a list of valid invited list of users