- Active installs
- 800+
- 10 ratings
- 5.0
- Last updated
- 1 year ago
- Version
- 0.0.17
- Tested up to
- WP 6.8.13
About this plugin
A simple plugin that adds a password reset facility to the WordPress REST API using a code. The process is a two step process:
- User requests a password reset. A code is emailed to their registered email address
- 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.
Endpoints
The plugin adds two new endpoints to the REST API:
-
Endpoint: /wp-json/bdpwr/v1/reset-password
— HTTP Verb: POST
— Parameters (all required):
— email -
/wp-json/bdpwr/v1/set-password
— HTTP Verb: POST
— Parameters (all required):
— email
— password
— code -
/wp-json/bdpwr/v1/validate-code
— HTTP Verb: POST
— Parameters (all required):
— email
— code
Example Requests (jQuery)
Reset Password
$.ajax({
url: '/wp-json/bdpwr/v1/reset-password',
method: 'POST',
data: {
email: 'example@example.com',
},
success: function( response ) {
console.log( response );
},
error: function( response ) {
console.log( response );
},
});
Set New Password
$.ajax({
url: '/wp-json/bdpwr/v1/set-password',
method: 'POST',
data: {
email: 'example@example.com',
code: '1234',
password: 'Pa$$word1',
},
success: function( response ) {
console.log( response );
},
error: function( response ) {
console.log( response );
},
});
Validate Code
$.ajax({
url: '/wp-json/bdpwr/v1/validate-code',
method: 'POST',
data: {
email: 'example@example.com',
code: '1234',
},
success: function( response ) {
console.log( response );
},
error: function( response ) {
console.log( response );
},
});
Example Success Responses (JSON)
Reset Password
{
"data": {
"status": 200
},
"message": "A password reset email has been sent to your email address."
}
Set New Password
{
"data": {
"status": 200
},
"message": "Password reset successfully."
}
Validate Code
{
"data": {
"status": 200
},
"message": "The code supplied is valid."
}
Example Error Responses (JSON)
Reset Password
{
"code": "bad_email",
"message": "No user found with this email address.",
"data": {
"status": 500
}
}
Set New Password
{
"code": "bad_request",
"message": "You must request a password reset code before you try to set a new password.",
"data": {
"status": 500
}
}
Validate Code
{
"code": "bad_request",
"message": "The reset code provided is not valid.",
"data": {
"status": 500
}
}
Filters
A number of WordPress filters have been added to help customise the process, please feel free to request additional filters or submit a pull request with any that you required.
Filter the length of the code
add_filter( 'bdpwr_code_length' , function( $length ) {
return 4;
}, 10 , 1 );
Filter Expiration Time
add_filter( 'bdpwr_code_expiration_seconds' , function( $seconds ) {
return 900;
}, 10 , 1 );
Filter the date format used by the plugin to display expiration times
add_filter( 'bdpwd_date_format' , function( $format ) {
return 'H:i';
}, 10 , 1 );
Filter the reset email subject
add_filter( 'bdpwr_code_email_subject' , function( $subject ) {
return 'Password Reset';
}, 10 , 1 );
Filter the email content
add_filter( 'bdpwr_code_email_text' , function( $text , $email , $code , $expiry ) {
return $text;
}, 10 , 4 );
Filter maximum attempts allowed to use a reset code, default is 3, -1 for unlimmited
add_filter( 'bdpwr_max_attempts' , function( $attempts ) {
return 3;
}, 10 , 4 );
Filter whether to include upper and lowercase letters in the code as well as numbers, default is false
add_filter( 'bdpwr_include_letters' , function( $include ) {
return false;
}, 10 , 4 );
Filter the characters to be used when generating a code, you can use any string you want, default is 0123456789
add_filter( 'bdpwr_selection_string' , function( $string ) {
return '0123456789';
}, 10 , 4 );
Filter the WP roles allowed to reset their password with this plugin, default is any, example below shows removing administrators
add_filter( 'bdpwr_allowed_roles' , function( $roles ) {
$key = array_search( 'administrator' , $roles );
if( $key !== false ) {
unset( $roles[ $key ] );
}
return $roles;
}, 10 , 1 );
Filter to add custom namespace for REST API
add_filter( 'bdpwr_route_namespace' , function( $route_namespace ) {
return 'xyz/v1';
}, 10 , 1 );
Credits
- Plugin icon / banner image by Sincerely Media
Analytics
Live from WordPress.org, refreshed daily. Last refresh Nov 30, 2026.
- Downloads on a typical day are up 60% on the month before.
- Passes 2 of 4 health checks below.
Health checks
What a careful site owner looks at before installing.
- Actively maintained Last release 1 year ago
- Tested with current WordPress Tested up to 6.8.13, 3 releases behind
- Support questions answered Nothing open in the last two months
- Well rated 5.0 stars from 10 ratings
- Latest week
- 112
- Typical week
- 58
- Peak
- 196 Week of Mar 2
View as table
| Week | Downloads |
|---|---|
| Week of Nov 23 | 112 |
| Week of Nov 16 | 119 |
| Week of Nov 9 | 91 |
| Week of Nov 2 | 107 |
| Week of Oct 26 | 102 |
| Week of Oct 19 | 80 |
| Week of Oct 12 | 74 |
| Week of Oct 5 | 53 |
| Week of Sep 28 | 82 |
| Week of Sep 21 | 60 |
| Week of Sep 14 | 56 |
| Week of Sep 7 | 34 |
| Week of Aug 31 | 46 |
| Week of Aug 24 | 43 |
| Week of Aug 17 | 41 |
| Week of Aug 10 | 45 |
| Week of Aug 3 | 58 |
| Week of Jul 27 | 46 |
| Week of Jul 20 | 38 |
| Week of Jul 13 | 36 |
| Week of Jul 6 | 34 |
| Week of Jun 29 | 45 |
| Week of Jun 22 | 42 |
| Week of Jun 15 | 29 |
| Week of Jun 8 | 52 |
| Week of Jun 1 | 45 |
| Week of May 25 | 57 |
| Week of May 18 | 32 |
| Week of May 11 | 54 |
| Week of May 4 | 65 |
| Week of Apr 27 | 48 |
| Week of Apr 20 | 105 |
| Week of Apr 13 | 82 |
| Week of Apr 6 | 47 |
| Week of Mar 30 | 61 |
| Week of Mar 23 | 49 |
| Week of Mar 16 | 55 |
| Week of Mar 9 | 80 |
| Week of Mar 2 | 196 |
| Week of Feb 23 | 142 |
| Week of Feb 16 | 66 |
| Week of Feb 9 | 73 |
| Week of Feb 2 | 65 |
| Week of Jan 26 | 66 |
| Week of Jan 19 | 73 |
| Week of Jan 12 | 65 |
| Week of Jan 5 | 90 |
| Week of Dec 29, 2025 | 41 |
| Week of Dec 22, 2025 | 41 |
| Week of Dec 15, 2025 | 55 |
| Week of Dec 8, 2025 | 78 |
| Week of Dec 1, 2025 | 99 |
Not ranked yet. Install, download and rating ranks cover the 5,000 most popular plugins on WordPress.org, and Trending needs about 100 downloads on a typical day.
Reviews
From folks on WPFolks
No reviews from folks yet. Used it? Be the first to say how it went.
Latest on WordPress.org
This plugin, is extremely well thought through and very well made. Plenty of filters for developers to hook into and adjust to their liking. I’ve managed to filter the email body, the characters used for the code, the REST API namespace, the code length and…
You’ve helped me more than you know. Is it possible to use it with a user who is an administrator? This topic was modified 2 years, 9 months ago by jaestradag.
The plugin does exactly what it is supposed to do. The filters allow extensive customization. Many thanks to the developers!
This plugin is great! Works really well and Dominic is really helpful if you have any question. I recommend.
Also the author help me out a lot with things related to the plugin.
