aaemnnosttv / wp-cli-login-command

Log in to WordPress with secure passwordless magic links.
https://aaemnnost.tv/wp-cli-commands/login/
MIT License
292 stars 47 forks source link

The attempted magic login has expired or already been used. #52

Closed michacassola closed 2 weeks ago

michacassola commented 2 years ago

Hey, can't get any link to work. Where do I start to troubleshoot?

aaemnnosttv commented 2 years ago

Hi there 👋 It could be failing for a number of reasons. Would you please share a bit more information about your environment? What output do you get for wp --info and wp package list?

Also see the few related issues there are to this:

The first thing I'd try is to make sure the package and companion plugin are up to date.

michacassola commented 2 years ago

Hey, thank you so much for the support!

Here the wp --info output: (domain has been changed to example.com)

OS:     Linux 5.13.0-28-generic #31~20.04.1-Ubuntu SMP Wed Jan 19 14:08:10 UTC 2022 x86_64
Shell:
PHP binary:     /usr/bin/php
PHP version:    8.1.1
php.ini used:
MySQL binary:   /usr/bin/mysql
MySQL version:  mysql  Ver 15.1 Distrib 10.7.3-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
SQL modes:
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /var/www/example.com/htdocs
WP-CLI packages dir:    /home/qycli/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.6.0

wp package list output:

+----------------------------------+--------------+------------+--------+----------------+
| name                             | authors      | version    | update | update_version |
+----------------------------------+--------------+------------+--------+----------------+
| aaemnnosttv/wp-cli-login-command | Evan Mattson | dev-master | none   |                |
+----------------------------------+--------------+------------+--------+----------------+

To make sure it's not php 8.1 I quickly switched over to 7.4 and here the output of wp --info:

OS:     Linux 5.13.0-28-generic #31~20.04.1-Ubuntu SMP Wed Jan 19 14:08:10 UTC 2022 x86_64
Shell:
PHP binary:     /usr/bin/php
PHP version:    7.4.27
php.ini used:
MySQL binary:   /usr/bin/mysql
MySQL version:  mysql  Ver 15.1 Distrib 10.7.3-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
SQL modes:
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /var/www/example.com/htdocs
WP-CLI packages dir:    /home/qycli/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.6.0

Both php version are compiled with snapcraft and selfinstalled by copying the binaries out of the snap to their "normal" locations and configs loaded in from the qycli LEMP stack, that I am making.

michacassola commented 2 years ago

I still don't know whats wrong. Do you have any idea?

blairwigleyactu commented 2 years ago

Did you get anywhere with this? I've Got a similar issue.

michacassola commented 2 years ago

No, the maintainer @aaemnnosttv does not seem to know what's going on either. I had done everything from my end as far as I could see but the problem persisted. I ended up taking it out of my stack builder https://github.com/HOSTYON/qycli .

aaemnnosttv commented 1 year ago

Sorry we weren't able to figure out your issue @michacassola, I haven't had much time to follow up here. Perhaps there may be a common cause with #55.

michacassola commented 1 year ago

Ahhhhh, ok some transient stuff must be it because I use the other WP Redis Object Cache plugin from the pantheon.io guys which also handles transients. Will have to try with --expires=0 again. Thanks for taking the time!!