iMerica / dj-rest-auth

Authentication for Django Rest Framework
https://dj-rest-auth.readthedocs.io/en/latest/index.html
MIT License
1.67k stars 311 forks source link

REST_AUTH_PW_RESET_USE_SITES_DOMAIN not working #432

Open khaled-s opened 2 years ago

khaled-s commented 2 years ago

REST_AUTH_PW_RESET_USE_SITES_DOMAIN is not working when set to True


if getattr(settings, 'REST_AUTH_PW_RESET_USE_SITES_DOMAIN', False) is True:
    url = build_absolute_uri(None, path)
else:
    url = build_absolute_uri(request, path)

in AllAuthPasswordResetForm always returning False and thus building the URL from request

ishakoktn commented 1 year ago

Should be in settings.py purely, not in REST_AUTH_SERIALIZERS dict.

instead of this:

REST_AUTH_SERIALIZERS = {
    'REST_AUTH_PW_RESET_USE_SITES_DOMAIN': True,
 }

use this:

REST_AUTH_PW_RESET_USE_SITES_DOMAIN = True