How do I use the auth.api.deleteUser endpoint from a server action?
I am trying to figure out how to invoke different auth.api endpoints from my server code in NextJS. I cannot seem to figure out what the implementation should be.
2 Replies
Oh its meant for a user deleting their own account...
How would I call an admin action to delete a user like based on ID?
Oh there is an admin plugin available. Interesting. For reference this is how you can use things to delete the "currently logged in user":
Solution
Admin | Better Auth
Admin plugin for Better Auth