dominic-ks / bdvs-password-reset

WordPress - Allow users to reset their password using a random code via the REST API
GNU General Public License v3.0
9 stars 3 forks source link
hacktoberfest

Password Reset with Code for WordPress REST API

A simple plugin that adds a password reset facility to the WordPress REST API using a code. The process is a two step process:

  1. User requests a password reset. A code is emailed to their registered email address
  2. The user enters the code when setting a new password, which is only set if the code is valid and has not expired

It is also possible to check the validity of a code without resetting the password which enables the possibility of setting the password by other means, or having a two stage process for checking the code and resetting the password if desired.

Default settings are to use an 8 digit code consisting of numbers, upper and lower case letters and special characters, which has a life span of 15 minutes, afterwhich a new code would need to be requested. By default a user can attempt to use or validate a code up to 3 times before automatically invalidating it.

IMPORTANT NOTICE

This plugin was recently updated due to a reported security vulnerability. Changes to the default settings may not be backwards compatible depending on your integration with the plugin. The latest version may not currently be available through the WordPress.org repository.

The following key updates were made:

Endpoints

The plugin adds three new endpoints to the REST API:

Endpoint HTTP Verb Parameters (all required)
/wp-json/bdpwr/v1/reset-password POST email
/wp-json/bdpwr/v1/set-password POST email
password
code
/wp-json/bdpwr/v1/validate-code POST email
code

Installation & Docs

The plugin is hosted on and can be downloaded from the wordpress.org plugin repo, you will also find here more general info about how to use and customise the plugin

Support

Plugin support is provided via the plugin support page on wordpress.org:

Issues and Enhancements

If you find any issues or have ideas for the plugin, please feel free to raise an issue here on GitHub.

Contributions

Contributors are definitely welcome. Please checkout the CONTRIBUTING.md file for info and guidelines.

Security Vulnerabilities

Please report security bugs found in the source code of the bdvs-password-reset plugin through the Patchstack Vulnerability Disclosure Program. The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. Report a security vulnerability.

Change Log