I am currently working on a reset password feature (sends email) for a project that's written in Django backend, Reactjs frontend. I am using Django's own PasswordResetView to implement this feature and it works as intended. However I want a page on my frontend sending a POST request to "reset_password/", but I'm getting a "POST http://localhost:8000/user/reset_password/ 403 (Forbidden)" error message. I don't want to use a template to implement this feature, but a Form (component) written in Reactjs running on localhost:3000. How can I do this? Or should I try another approach to the reset password feature?
This is the function that tries to post to backend:
async resetPassword(email) {
const resetPasswordResponse = await client.post("reset_password/", {
email: email,
});
return resetPasswordResponse;}