fres
BABetter Auth
•Created by fres on 2/11/2025 in #help
How to handle niche case with multi-tenant
Hi I didnt manage to implement it yet, since I am doing other stuffs, but my I have couple of ideas:
- do it on my own, implement magic link, google and github signin custom, without better auth, only for
*.domain.com
.
- create a second auth configuration. What I mean by that is to actually create a new auth.visitors.ts
and auth-client.visitors.ts
, add the routes to my *.domain.com
and ofc create separates tables (and remap the default one to my "custom visitors" one in the auth.visitors.ts
). In my case they are two different apps, they dont need to share sessions between them so it's okay for me.
Ofc. I also need to add the tenantId
to the better auth tables3 replies