New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is there a check for a specific backend? #196
Comments
Hi @saevarom, thanks for reporting the issue. I'm afraid I can't help your specific case because I don't have all relevant data. If you want me to help you I'd advise to report a bug via templates listed here: But I think I can answer the question in the issue title:
For the sake of brevity, I will refer to the I found out why that change was introduced: #168 In short, if you have multiple backends (used by the https://docs.djangoproject.com/en/4.1/topics/auth/default/#django.contrib.auth.login So in other words, By default, the value of it is set to I added the check to avoid ankward situation when someone changes But then I realized, this is still not perfect. If there are multiple backends, we still may end up using the "wrong" backend in So I started to dig into internals of the Django Unfortunately, that behavior is not dockumented (or to be precise I didn't find anything in the docs), So there is small possibility it could be changed. My proposal is the following:
That would probably mean that we would need to release a minor/major version (0.8.0), not a patch version as the change would not be backwards-compatible. However, in most cases, that would be the "expected" behavior. Let me know what you think about it. |
Updated proposal: |
Hi @apragacz Thanks for you response. I think your updated proposal would work fine. At least I think it would not prevent me from keeping my current structure or upgrading to newer versions. |
Changes: * Use user backend field when available (#196)
@saevarom I released 0.7.3 version which should fix your issue. Let me know if it helped. |
Thank you @apragacz - I will check when I have the next chance |
Thank you for your help, I believe this has fixed my issue and I can now upgrade Django and django-rest-registration :) |
At some point a check for a specific authentication backend was introduced.
I get this error message:
I implemented my own authentication backend but use rest-registration for the signup process. This error prevents me from upgrading django to a more recent version and is also very restraining. People should be able to use the rest-registration package standalone without it being opinionated about which authentication backend to use.
This could be changed to a warning to indicate that if you have a problem, you should look into the authentication backends setting.
The text was updated successfully, but these errors were encountered: