aaemnnosttv / wp-cli-login-command

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

WP 4.7 Magic link always brings up "The attempted magic login has expired or already been used" #8

Closed codemountain closed 7 years ago

codemountain commented 7 years ago

Since upgrade to WP 4.7, whenever i issue a wp login create username , i get a link and when we paste it in it comes up with the message like the link has been used. Look thur error logs did not find anything. Any clues? Thanks. Note: upgraded both server and client side packages to today's latest versions of wp-cli-login

aaemnnosttv commented 7 years ago

Sounds like something specific to your environment. I just tested this and wasn't able to replicate.

v1.1 which was just released ran its tests against 4.7 in the build as well, so I think it's safe to say that it is compatible with 4.7.

Not to say that you don't have a problem of course. Could you share some details about your setup?

Also, when you say you're pasting it in, I assume you mean pasting straight from your terminal to your browser. Pasting the login link into an app like slack, or any other which tries to load a preview of the url you are sharing will break the login link (see #1).

Ps. you can also save yourself the copy/paste by appending --launch to the create command.

codemountain commented 7 years ago

Thanks for the feedback:) Think you are right, I have 2 almost identical sites on 4.7 and one of them the login URL works and the other the URL login doesn’t. and yes i paste directly in the browser for both. I’ll compare permissions, plugins and try to match to isolate issue. Is there an error log from the plugin that i can look at as well? Thanks!

On Dec 14, 2016, at 10:50 AM, Evan Mattson notifications@github.com wrote:

Sounds like something specific to your environment. I just tested this and wasn't able to replicate.

v1.1 which was just released ran its tests against 4.7 in the build as well, so I think it's safe to say that it is compatible with 4.7.

Not to say that you don't have a problem of course. Could you share some details about your setup?

Also, when you say you're pasting it in, I assume you mean pasting straight from your terminal to your browser. Pasting the login link into an app like slack, or any other which tries to load a preview of the url you are sharing will break the login link (see #1 https://github.com/aaemnnosttv/wp-cli-login-command/issues/1).

Ps. you can also save yourself the copy/paste by appending --launch to the create command.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aaemnnosttv/wp-cli-login-command/issues/8#issuecomment-267069844, or mute the thread https://github.com/notifications/unsubscribe-auth/AAvb5lfYpH1kfZ0GAlO7Hg5Na7u4R2-kks5rIBBDgaJpZM4LMUgX.

aaemnnosttv commented 7 years ago

Neither the command/plugin implements their own logs of any kind. If you're seeing the screen that looks like this:

image

-- then I wouldn't expect there to be an error, as this is the intended behavior when trying to access a valid login link which has been used or expired.

If you find out what the problem is, by all means please let me know!

codemountain commented 7 years ago

Got it :-P code 18.. as most of the time. Had a script automating old domain search and replace, it failed on the second site so siteurl option was not the right one and hence generating a link for the wrong domain. So plugin security = checked :-) thanks for the help.

On Dec 14, 2016, at 11:20 AM, Evan Mattson notifications@github.com wrote:

Neither the command/plugin implements their own logs of any kind. If you're seeing the screen that looks like this:

https://cloud.githubusercontent.com/assets/1621608/21190130/88cb510e-c229-11e6-84b9-2ba83d5c6296.png -- then I wouldn't expect there to be an error, as this is the intended behavior when trying to access a valid login link which has been used or expired.

If you find out what the problem is, by all means please let me know!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aaemnnosttv/wp-cli-login-command/issues/8#issuecomment-267078603, or mute the thread https://github.com/notifications/unsubscribe-auth/AAvb5ot3Gad-p14YEtVZP9RG2DqwY5zyks5rIBc9gaJpZM4LMUgX.

aaemnnosttv commented 7 years ago

Thanks for for the follow up and sharing the cause 👍

Cheers!