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
How to customize the url in password_reset_confirm.html #58
Comments
Override REST_AUTH_SERIALIZERS = {
'PASSWORD_RESET_SERIALIZER': 'path.to.your.CustomPasswordSerializer'
} make this serializer inherit from the base and add your own custom save method that handles the custom logic. from dj_rest_auth.registration.serializers import RegisterSerializer
class CustomRegistrationSerializer(RegisterSerializer):
def save(self, request):
# get whatever data you need
verify_url = ' <add your own custom url here>'
# send the email using this new verify url See the source code for |
I have been through these questions before, the folks there did a pretty good job to make me understand the full cycle of this, also I have added the code snippet I used in my project. Please read and check out my past issues |
Closing this since we now have lots of answers. |
the code can custom password_reset_confirm url in email ,try
|
I appreciate you forking and maintaining this project!
I have my api hosted at a different location (completely different url) than my frontend. When I send the password reset confirm email I'd like to have the url point to one on my front end which can be parsed and displayed there. I can't figure out where the email content is generated.
I see this line
# this url is used to generate email content url(r'password-reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', TemplateView.as_view(template_name="password_reset_confirm.html"), name='password_reset_confirm'),
so I understand that is where the email url is being generated from. I can't figure out where to customize this email. I tried searching but forked repos aren't able to search code. I tried searching the original repo but still couldn't find it.
Thanks!
The text was updated successfully, but these errors were encountered: