[Django]-Can i avoid the creation of the Django auth.model.User table when using "other authentication sources"?

3👍

The short answer to your question is – yes, it can. Simply set the managed property to False on the User model.

1👍

You should map the user from the external authentication into the auth.User object.

👤lprsd

1👍

Remove django.contrib.auth from the INSTALLED_APPS setting.

0👍

Is there a particular reason you don’t want the table to be created? If you write (or use a pre-existing) LDAP authentication backend, the User objects will be stored in the table, but they won’t have any password information stored, and you can easily update fields like email address and name during the authentication process, so you won’t create a disconnect between information stored in LDAP and managed in the Django table (i.e., you can continue updating auth information from LDAP, and don’t have to worry about also updating it in the Django DB).

👤mipadi

0👍

There’s no way to avoid the table and still have any sort authentication. The “alternative” authentication methods still make use of the auth_user table, they just authenticate via another means.

Leave a comment