{"id":43494,"date":"2016-04-28T21:21:42","date_gmt":"2016-04-28T21:21:42","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/one-time-login\/"},"modified":"2026-01-10T15:13:40","modified_gmt":"2026-01-10T15:13:40","slug":"one-time-login","status":"publish","type":"plugin","link":"https:\/\/da.wordpress.org\/plugins\/one-time-login\/","author":183657,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.4.0","stable_tag":"0.4.0","tested":"6.9.4","requires":"4.4","requires_php":"7.1","requires_plugins":null,"header_name":"One Time Login","header_author":"Daniel Bachhuber","header_description":"","assets_banners_color":"","last_updated":"2026-01-10 15:13:40","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/one-time-login\/","header_author_uri":"https:\/\/danielbachhuber.com","rating":5,"author_block_rating":0,"active_installs":40000,"downloads":186257,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"0.1.0":{"tag":"0.1.0","author":"danielbachhuber","date":"2016-04-28 21:39:26"},"0.1.1":{"tag":"0.1.1","author":"danielbachhuber","date":"2016-05-26 16:20:46"},"0.1.2":{"tag":"0.1.2","author":"danielbachhuber","date":"2017-01-24 23:12:10"},"0.2.0":{"tag":"0.2.0","author":"danielbachhuber","date":"2018-05-03 22:41:52"},"0.3.0":{"tag":"0.3.0","author":"danielbachhuber","date":"2020-05-19 18:55:54"},"0.3.1":{"tag":"0.3.1","author":"danielbachhuber","date":"2021-06-01 18:52:12"},"0.4.0":{"tag":"0.4.0","author":"danielbachhuber","date":"2026-01-10 15:13:40"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0","0.1.1","0.1.2","0.2.0","0.3.0","0.3.1","0.4.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[602],"plugin_category":[38],"plugin_contributors":[220500,77514,156919],"plugin_business_model":[],"class_list":["post-43494","plugin","type-plugin","status-publish","hentry","plugin_tags-login","plugin_category-authentication","plugin_contributors-acali","plugin_contributors-danielbachhuber","plugin_contributors-gdespoulain","plugin_committers-danielbachhuber"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/one-time-login.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Need access to a WordPress install but don't want to create a new user account? Use this plugin to generate one-time login URLs for any existing user.\nThen, copy the URL, paste it into your web browser, and... voila!<\/p>\n\n<p>Because they are one-time login URLs, they will only work once. If you need access again, you'll need to run the WP-CLI command again.<\/p>\n\n<h3>Using WP CLI to generate OTT URLs<\/h3>\n\n<h3>Example<\/h3>\n\n<pre><code>wp plugin install one-time-login --activate &amp;&amp; wp user one-time-login &lt;user&gt; --count=3 --delay-delete\n<\/code><\/pre>\n\n<p>After you run the command above, you'll see a success message like this:<\/p>\n\n<pre><code>http:\/\/wpdev.test\/wp-login.php?user_id=2&amp;one_time_login_token=93974b48e3a418b895fc7ca476f1a607d8b99345\n<\/code><\/pre>\n\n<p>Or like this if you asked for more than one:<\/p>\n\n<pre><code>http:\/\/wpdev.test\/wp-login.php?user_id=1&amp;one_time_login_token=2b9c6f5d71d51d530e397ee9da3b50e4e3dd06e7\nhttp:\/\/wpdev.test\/wp-login.php?user_id=1&amp;one_time_login_token=90897da439a116c613fc1c49c372e6b1f7c72ad8\nhttp:\/\/wpdev.test\/wp-login.php?user_id=1&amp;one_time_login_token=68c8074743de849db606500c3caa39a7432dc601&lt;h3&gt;Parameters&lt;\/h3&gt;\n<\/code><\/pre>\n\n<p>* <em>count<\/em>: Generate more than one login token (default: 1);\n* <em>delay-delete<\/em>: Delete existing tokens after 15 minutes, instead of immediately.<\/p>\n\n<h3>Using WP API to generate OTT URLs<\/h3>\n\n<h3>Example with cUrl<\/h3>\n\n<pre><code>curl -X POST \\\n    http:\/\/wpdev.test\/wp-json\/one-time-login\/v1\/token\n    -H 'authorization: Basic YWRtaW46eFRQeUJ5c3hEckhkY3BNYjE2endiQ2tj'\n    -H 'cache-control: no-cache'\n    -H 'postman-token: 8dcfa79a-401a-2c7d-c593-703e683ce785'\n    -d '{\n        \"user\":\"admin\",\n        \"count\": 3,\n        \"delay-delete\": true\n    }'&lt;h3&gt;Parameters&lt;\/h3&gt;\n<\/code><\/pre>\n\n<p>Just as with WP CLI, you can add the <strong>count<\/strong> and <strong>delay_delete<\/strong> parameters to your call.<\/p>\n\n<p>Feel free to <a href=\"https:\/\/github.com\/danielbachhuber\/one-time-login\">file issues and pull requests<\/a> against the project on Github.<\/p>\n\n<!--section=installation-->\n<p>See description for installation and usage instructions.<\/p>\n\n<!--section=changelog-->\n<h4>0.4.0 (August 30th, 2021)<\/h4>\n\n<ul>\n<li>Introduces <code>one-time-login\/v1\/token<\/code> WP REST API endpoint to generate tokens [<a href=\"https:\/\/github.com\/danielbachhuber\/one-time-login\/pull\/28\">#28<\/a>].<\/li>\n<\/ul>\n\n<h4>0.3.1 (June 1st, 2021)<\/h4>\n\n<ul>\n<li>Fires <code>one_time_login_after_auth_cookie_set<\/code> action after the auth cookie is set [<a href=\"https:\/\/github.com\/danielbachhuber\/one-time-login\/pull\/27\">#27<\/a>].<\/li>\n<\/ul>\n\n<h4>0.3.0 (May 24th, 2018)<\/h4>\n\n<ul>\n<li>Introduces <code>--delay-delete<\/code> flag to delete old tokens after 15 minutes instead of immediately.<\/li>\n<li>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?\".<\/li>\n<\/ul>\n\n<h4>0.2.0 (May 3rd, 2018)<\/h4>\n\n<ul>\n<li>Introduces support for multiple one-time login links.<\/li>\n<li>Links to the login screen from the \"Invalid token\" error message.<\/li>\n<\/ul>\n\n<h4>0.1.2 (June 11th, 2016)<\/h4>\n\n<ul>\n<li>Fires <code>one_time_login_created<\/code> action when login URL is created, and <code>one_time_login_logged_in<\/code> action when user is logged in via one-time login URL.<\/li>\n<\/ul>\n\n<h4>0.1.1 (May 26th, 2016)<\/h4>\n\n<ul>\n<li>Bug fix: Pass <code>$assoc_args<\/code> into the command to ensure the <code>--porcelain<\/code> flag actually works.<\/li>\n<\/ul>\n\n<h4>0.1.0 (April 28th, 2016)<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Use WP-CLI to generate a one-time login URL for any user","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/43494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=43494"}],"author":[{"embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/danielbachhuber"}],"wp:attachment":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=43494"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=43494"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=43494"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=43494"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=43494"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=43494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}