How can I reset password in django by sending code to the user?

Question:

How can I implement password reset in django, in a safe and secure way by sending a code to the user’s email/phone?
I emphasise that I want to do this by sending a code to the user, not a link or anything else.
Something like what microsoft or google accounts does.

I’ve searched a lot for this problem but I’ve never found a proper solution.

Asked By: Amirreza Akbari

||

Answers:

I’m not really sure, but I think you can do it with django-phone-verify
The example on the website is about first authenticating, but modules API can be reused/extended.

Answered By: Kristof Rado