Where to pass `forceAllowId` ?
I need to customize the ID generation for the
User
table by passing an existing user ID instead of letting the system auto-generate one. I found the documentation at https://www.better-auth.com/docs/guides/create-a-db-adapter for creating a custom adapter, but the section about user ID generation is unclear:
My question is: Where exactly should I pass the forceAllowId parameter in the create method?
I tried the following code, but forceAllowId doesn't seem to work:
Could someone clarify the correct syntax for using forceAllowId to allow custom user ID creation?Create a Database Adapter | Better Auth
Learn how to create a custom database adapter for Better-Auth
1 Reply
Question solved: I haven't clarify the adpater and internalAdapter's diffrence.
Previous code I use:
What a stupid quesition.