I am developing a Django web application. I have used built in user authentication of Django. In this app it uses user_auth table for authentication. user_auth table contains entries for our end users (customers). A given end user logs to Django app using built in authentication using user name password. I have created a customer facing mobile app that uses JWT token for API calls from mobile app. JWT token is created using Django REST framework which uses username password to issue JWT token.
Additionally I have another table that holds information about our vendors. This is a separate model in our Django app so far. I don’t want to make any major changes to our DB schema (for now not going into Base User and then Student type user and Teacher type user setup). We have to generate a simple mobile app for our vendors. I wanted to use password less authentication using OTP (after validating vendor’s email, DOB and mobile number entered during login to mobile app). Idea is to validate in Django app and then generate a JWT token and then subsequently use it in rest of my Vendor mobile app for further APIs calls from mobile to Django web app.
Let me know if what I want to do is possible or not and if possible can you provide any assistance on how to approach this. I started looking into creating class CustomTokenObtainPairView(TokenObtainPairView) and its custom serialiser class CustomTokenObtainPairSerializer(TokenObtainPairSerializer) but not getting much further. Can provide further assistance as to how to proceed or just confirm this is not possible as user name and password is must.