Completely different user flows
What would be the recommended approach for handling vastly different user types with better auth?
I have, for example, students and teachers that have different requirements and sign up flows with many additional fields.
Should I make two separate auth instances with their own db tables and routes or keep just one instance with roles and do table joins for other fields?
Teachers would also have to be manually reviewed and approved by admins before getting access to the platform.
My current thoughts are to have one instance using roles and to disable better-auth's default sign up handler and implement my own using either a custom handler or plugin for the different sign ups.
I've looked at other plugins / routes and saw how to use
I've looked at other plugins / routes and saw how to use
ctx.context.internalAdapter.createUser
, but not sure how I can use this with a db transaction to ensure the join table records are properly created as well as the base user.0 Replies