change UserId on admin plugin
Hi all. i'm using mongodb as my database adatapter. I' ve created my custom logic where a custom session is created once the client logs in with discord. In my custom logic i grant access to the user only if there's a record on another collection of the database . if so , the authentication flow continues and better -auth generates all the records it needs.
now , i want to use the admin plugin, i managed to set it up , however i need the userID generated by better auth to be able to delete the records accordingly. i want to use the discord client id . is it possible?
1 Reply
Hello, there is a table in your database called 'account', which contains a
accountId (I assume it'll be discord client id you seek, but check it out) and userID you can use to delete the user
So if you just query it, you should be able to do that