I'm building an application using Django in which each customer will have their own domain name (subdomain in our domain, such as customer.example.com or their own domain, such as customer.com). Ignoring the problem of web server configuration, SSL (that'll be fun, thank god for Let's Encrypt), etc, in Django, how can I have users per domain?
The customers would be one type of user and the customer's users would be a different type. The same username should be useable in each of the served domains. Is there anything prebuilt that can help? If not, how do I modify the way auth happens in Django to limit it to the current domain.
My problem is not how to serve each of the domains/subdomains, but how to do authentication (registration, password reset, and all that), which means thisis not a duplicate of Using subdomains in django
I have looked into https://github.com/tomturner/django-tenants and https://github.com/bernardopires/django-tenant-schemas and for my use case, using PostgreSQL schemas to separate the data is not appropriate.