I currently have a large Django project leveraging Django REST Framework.
I have another, smaller Django project that I would like to build off of the main one that doesn't share the database directly but rather grabs necessary data over API.
I would like to override the AUTHENTICATION_BACKEND for the smaller project and have it use the API auth endpoint from the larger one as the authenticator.
Basically the process would go as follows:
- User attempts to log into the small Django project using credentials for their user in the large Django-DRF project.
- Small Django project sends API login request to large Django-DRF project.
- Large Django-DRF project returns API token and serialized user information.
- Small Django project auto-adds/updates user to its database with information from large Django-DRF project's response.
- Small Django project responds to user client with token so that AJAX requests from Small Django project's pages can be made directly to large Django-DRF project's endpoints.
Are there existing plugins worth leveraging for this use case or should I write my own AUTHENTICATION_BACKEND?