Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom auth backend compatibility for TenantClient
**Rationale**: I'm creating a B2B multitenant app that logs in user using a custom auth backend which uses e-mail as one of the identifiers and authenticates users by parsing `request.META['HTTP_HOST']` to get the relevant schema. However, by doing this, I wasn't able to use `TenantClient`'s `login()` method since my custom auth backend needs a request object but django client's `login` method chain (`login -> authenticate(**credentials)->... ` [as shown here](https://github.com/django/django/blob/master/django/test/client.py#L594)) doesn't pass on a `request` object to my custom auth backend. Since I feel like B2B multitenant apps may often use custom auth backends like I did, I felt it necessary to propose this change.
- Loading branch information