Assuming you've implemented your own AbstractUser sub-class named DannyUser, you then have a couple of choices:

Embed all of the information needed into a new field (a JSONField subclass for example) -- not really recommended as this leaks random information into a housekeeping table and is ill-advised IMO.

Design a new Model for each authentication service and tie it via a foreign key & reverse relationship to your DannyUser instances. Then you could use something like my_danny_instance.fastapi_account.auth_token where needed. This will also allow you to encrypt specific fields or use a secret management solution later on.


Simply normalize your data as far as it makes sense to.
Hello guys I have an existing Django project which has certain features and also has user data. For certain features, users use the API served through Django (also the authentication), but since there is a need for new feature which needs to be implemented through FastAPI,  I need to have the same users authenticate or (better to say) to be recognized by FastAPI (as the same user in Django) to save or retrieve an action corresponding to user in the db (through FastAPI).
How to achieve that? How do I store the user data, like user_id and username for each user safely? How to properly design the database table?
Please do let me know, how to start.
Thank you.
How to identify and save the right "user" when we use Django (Existing proj) for authentication and FastAPI (new feature) for API's?