简体   繁体   中英

Implement forgot password functionality using Djoser

I am new to Django framework and now have a trouble with forgot password functionality. I have read the documentation about that functionality but have some not clear. I need someone who can show me the steps on both frontend and backend in more detail.

reset() {
    var self = this;
    axios
        .post(this.$apiUrl + "password/reset/", {
            email: self.email
        })
        .then(response => {
            console.log(response);
        })
        .catch(error => {
            console.log(error);
        });
}

Please refer to documentation on this feature .

Basically first you need to call the reset endpoint just as you did in question. Next the user should receive an email which will point them to the url given in PASSWORD_RESET_CONFIRM_URL setting. On that url your frontend app should call the confirmation url on API (see docs).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM