iMerica / dj-rest-auth

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

login still works with previous email after updating login email address #556

Open henryla92 opened 12 months ago

henryla92 commented 12 months ago

Hi there,

I'm using DRF and email login with this package, when I try to change a user's email in shell like so:

user = User.objects.get(email="abc@example.com")
user.email = "cde@example.com"
user.save()

The new email works after but the previous email also works when logging in. I'm working on a endpoint to allow users to edit their emails. Is this the right way to do it? And what might I be doing wrong?

Thank you!