We are building a no-code app builder tool. Our us...
# general
p
We are building a no-code app builder tool. Our use case is unique in that we effectively want multi tenancy but across different root domains - want to explore if that's possible (I think the answer is no)
r
Hey @peachneo
Will the login form be on each of the individual root domains? Or on a common domain and the user is redirected to their root domain?
p
In most cases each individual root domain. Our customers will be using us to build their own webn apps/sites that they would host on their own custom domains
r
Right. And those individual root domains will talk to the same api domain?
p
they would yes
r
Alright. So this is possible
If you want to use cookies for session tokens, then you will have to set up a cname domain for the api layer which will have the same root domain as the website. Otherwise cookies won’t work on safari
Alternatively, you could use header based session tokens. The downside to this is that it’s little less secure since the frontend has access to the session tokens.
About storing data, we don’t have proper multi tenancy on the backend level yet, so you would need to override the backend APIs for sign up (for example) to add the tenant id to the email.
But that’s simple enough to do anyway
p
Ok that's good to know header based tokens would be fine.
Ah ok so when a user signs up we would do something like
user@tenantid.gmail.com
?
r
No. Something like user+tenantid@gmail.com
p
ok, but the general principle is you bake the tenant id into the email
How would that work with social login?
r
Yes
With social, you would add it to the social login user Id
p
Nice
Ok this sounds promising
r
👍
p
I already implemented auth, even with refresh token rotation but honestly i'd feel a lot better outsourcing it, especially given the feature set you guys have. Are there any scaling limits to be aware of with your hosted option?
r
Not really. No limits.
Just be aware about the pricing though
p
Yeah will keep that in mind, thanks for you help. Btw would love to see a cloudflare workers SDK. ❤️
r
Ah fair. You can open an issue about that to keep track of it when we make it 🙂
2 Views