ADMIN plugin not working
hey! i didn't want to open a gh issue just yet because maybe i'm doing something wrong, but i just integrated the admin plugin and found that nothing seems to be working for me.
1. signing up a new user doesn't set any default role value.
2. trying to impersonate (manually created users) or create user with auth-client gives 404
if someone could help me, i will greatly appreciate it. also lmk if you need any extra info. thanks ☺︎
4 Replies
hiya - i just had similar issues. make sure that you expose the correct fields in the database to better-auth. for 1, i just set the default role to
user
. not sure if it's the right approach, but better-auth can always change it to something else if necessaryhi. i believe i have the correct fields. this are the ones i added.
If 404 is sent, that means the admin plugin isn't properly added on the server.
hi. this is my auth server file.