Authentication Of a an already existing user model created with inspect_db

Hello Community I want to authenticate which was created normally using inspect_db is it possible? if it is possible how can i achieve it

Welcome @marveldo !

I think we need a few more details about what you’re trying to do.

It sounds to me like you’ve got an existing database that you are using, and you want to use that model as your user model. Is that correct?

Is that model appropriate as a user model? (Does it have all the fields it needs to use? Do you know how the password is stored in it?)

Do you need to use this in addition to the standard user model?

Yes it has all the fields it needs to use and the password is stored through password hashing actually b_crypt hashing but django wont recognize the model as a user model unless it has Abstract base user and permissions Mixins and apparently when i use that it adds some new fields which needs to migrated into the database and the database im connected to does not allow migrations or its locked from making migrations so my backend shows me an error

First for clarification, you wrote:

but, you go on to say:

which means that that model does not have all the fields it needs to be used as a standard Django User model.

In this case, what you would need to do is to create a custom authentication backend that is capable of working with this model as it currently exists.

Ohh thank you very much ill try that out

ohh yh and sorry for the confusion i didnt quite understand your question