anexia-it / django-rest-passwordreset

An extension of django rest framework, providing a configurable password reset strategy
BSD 3-Clause "New" or "Revised" License
419 stars 148 forks source link

Custom Auth Model #102

Closed ghaffaru closed 4 years ago

ghaffaru commented 4 years ago

How do I set a custom model to be used for the password reset flow ?

jamehii commented 4 years ago

Make sure your settings.py sets the following:

AUTH_USER_MODEL = YourCustomUserModel

ghaffaru commented 4 years ago

I have already set it for an initial custom model. How do i set another customer user model in the same project ?

jamehii commented 4 years ago

As far as I know, django settings.py has only one AUTH_USER_MODEL... can't set more than one unless creating another new project folder

anx-cbenke commented 4 years ago

@ghaffaru can we close this issue or do you need further assistance?

ghost commented 4 years ago

The project currently supports the Dajngo User Model, which can be customized/extended and replaced by the AUTH_USER_MODEL setting. From your description it seems that your are using a dedicated model with an additional authentication backend for the customers.

ghaffaru commented 4 years ago

Closing the issue now. I implemented the password reset from scratch, since I couldnt use this package for two different Auth Models in the same project