Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
One Time Login icon

One Time Login

v0.4.0
by Daniel Bachhuber · 5.0 (2 reviews)

Use WP-CLI to generate a one-time login URL for any user

30K+ active installs Updated Oct 18, 2023 Tested to 6.3.5 Requires PHP 7.1
Try Demo Download
Pre-installed Ready in ~10s No card

About One Time Login

This plugin allows you to generate one-time login URLs for any existing user in your WordPress install. These URLs can be used to log in to the website without creating a new user account. The plugin can be used through both WP CLI and WP API, and you can specify the number of login tokens to generate and whether to delay the deletion of existing tokens.

Frequently asked questions

What is the purpose of the One Time Login plugin?
The One Time Login plugin allows you to generate one-time login URLs for any existing user on a WordPress install. This is useful when you need access without creating a new user account.
How do I generate a one-time login URL?
You can generate one-time login URLs using WP-CLI or the WP API. After running the command, a success message will display the generated URL(s).
Are the generated URLs reusable?
No, the generated URLs are one-time login URLs and will only work once. If you need access again, you must run the WP-CLI command or WP API call again to generate new URLs.
Can I generate multiple one-time login URLs at once?
Yes, you can generate more than one login token by using the 'count' parameter when running the WP-CLI command or making a WP API call.
What is the 'delay-delete' parameter for?
The 'delay-delete' parameter allows you to delete existing tokens after 15 minutes, instead of immediately. This can be useful for providing a short window of extended access.

Changelog

0.4.0 (August 30th, 2021)

  • Introduces one-time-login/v1/token WP REST API endpoint to generate tokens [#28].

0.3.1 (June 1st, 2021)

  • Fires one_time_login_after_auth_cookie_set action after the auth cookie is set [#27].

0.3.0 (May 24th, 2018)

  • 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?”.

0.2.0 (May 3rd, 2018)

  • Introduces support for multiple one-time login links.
  • Links to the login screen from the “Invalid token” error message.

0.1.2 (June 11th, 2016)

  • Fires one_time_login_created action when login URL is created, and one_time_login_logged_in action when user is logged in via one-time login URL.

0.1.1 (May 26th, 2016)

  • Bug fix: Pass $assoc_args into the command to ensure the --porcelain flag actually works.

0.1.0 (April 28th, 2016)

  • Initial release.

Try other plugins