Contributors: danielbachhuber
Tags: login
Requires at least: 4.4
Tested up to: 5.4
Stable tag: 0.3.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Use WP-CLI to generate a one-time login URL for any user
Need access to a WordPress install but don't want to create a new user account? Use this plugin and WP-CLI to generate a one-time login URL for any existing user:
wp plugin install one-time-login --activate && wp user one-time-login <user>
After you run the command above, you'll see a success message like this:
http://wpdev.test/wp-login.php?user_id=2&one_time_login_token=ebe62e3
Copy the URL, paste it into your web browser, and... voila!
Because it's a one-time login URL, it will only work once. If you need access again, you'll need to run the WP-CLI command again.
Feel free to file issues and pull requests against the project on Github.
See description for installation and usage instructions.
- Introduces
--delay-delete
flag to delete old tokens after 15 minutes instead of immediately. - Improves invalid token message when user is already logged in: "Invalid one-time login token, but you are logged in as 'user_login'. Go to the dashboard instead?".
- Introduces support for multiple one-time login links.
- Links to the login screen from the "Invalid token" error message.
- Fires
one_time_login_created
action when login URL is created, andone_time_login_logged_in
action when user is logged in via one-time login URL.
- Bug fix: Pass
$assoc_args
into the command to ensure the--porcelain
flag actually works.
- Initial release.