How can I create an account without email and password in my plugin #620

Closed
opened 2026-03-13 07:57:20 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @h4kbas on GitHub (Feb 4, 2025).

I am developing a plugin to give access to people with a signature verification muck like the plugin magic link but it also needs to support user creation. I have spend some time to discover other plugins in the repository and collected necessary api code. However, I encountered two problems.

First, I inject another field in the user table and when I use find or create it requires a type T to be given which is impossible to solve because the User returned form the library doesn't have my field and whatever type I tried to provide I had a lot of trouble in typescript.

The other one is I need to create a user with only the field I created because I don't use email password or any other stuff like name. So, when I call the internalApi it is not possible with the types. So, if I use regular create then why am I using the better-auth because I imagine it won't trigger anything related.

Can you please give me examples and explain how to create a plugin which is capable of creating different fields and creating users without email password like fields. I read the docs and code but really it's so limited, I have spent hours.

Originally created by @h4kbas on GitHub (Feb 4, 2025). I am developing a plugin to give access to people with a signature verification muck like the plugin magic link but it also needs to support user creation. I have spend some time to discover other plugins in the repository and collected necessary api code. However, I encountered two problems. First, I inject another field in the user table and when I use find or create it requires a type T to be given which is impossible to solve because the User returned form the library doesn't have my field and whatever type I tried to provide I had a lot of trouble in typescript. The other one is I need to create a user with only the field I created because I don't use email password or any other stuff like name. So, when I call the internalApi it is not possible with the types. So, if I use regular create then why am I using the better-auth because I imagine it won't trigger anything related. Can you please give me examples and explain how to create a plugin which is capable of creating different fields and creating users without email password like fields. I read the docs and code but really it's so limited, I have spent hours.
Author
Owner

@Kinfe123 commented on GitHub (Apr 12, 2025):

You can create your own plugin tailored for own usecase

@Kinfe123 commented on GitHub (Apr 12, 2025): You can create your [own plugin](https://www.better-auth.com/docs/guides/your-first-plugin) tailored for own usecase
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#620