0

Maybe you can shed some light on if firebase meets my requirements, before digging in deep. What i have in mind is of the following structure:

  • www.domain.tld (more or less static site)
  • admin.domain.tld (admins can log in and create and manage customers)
  • customer1.domain.tld (customer can log in, configure it's site and invite "normal" users to sign up and log in)
  • customer2.domain.tld (...)
  • ...

This would require:

  • custom domain and subdomains (all with ssl/wildcard)
  • a single codebase with 3 compartments (landing page, admin, customer:id/name/subdomain)
  • some sort of ACL to restrict users to there own data/records, customers to theirs and theirs users and admins to all of them
  • seamless authentication on all of the above sites

Concerns, questions, links and resources are all very appreciated. Thank you!

spaxxUnited
  • 625
  • 1
  • 7
  • 16

1 Answers1

2

A single TLD on Firebase can have at most 20 subdomains. This makes it ill suited to the approach you're proposing.

You'll want to set up a separate project for each customer, or consider looking for another hosting solution.

Also see: Firebase hosting sub-domain limit

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Thanks. Good to know. Too bad they have not gone the wildcard subdomain route yet. Is this the only thing that doesn't meet my reuirements? – spaxxUnited Nov 21 '22 at 01:15
  • 1
    The question is really too broad to say much more, but if "some sort of ACL to restrict users to there own data/records" means that you want to secure the static assets that is also not possible on Firebase Hosting at the moment: https://stackoverflow.com/questions/27212004/can-firebase-hosting-restrict-access-to-resources. If it's about restricting access to data shown *on* the web site dynamically though, that *is* possible: https://stackoverflow.com/questions/69229292/how-can-i-restrict-access-to-firestore-database-to-only-requests-coming-from-spe – Frank van Puffelen Nov 21 '22 at 01:19
  • That would do no harm in my case. Thanks! – spaxxUnited Nov 21 '22 at 01:31