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

Honor `url` flag #6

Closed entr closed 7 years ago

entr commented 7 years ago

When I try to pass a url using the --url flag it doesn't seem to make any difference.

$ wp --version
WP-CLI 0.24.1

$ wp core version
4.6.1

$ php --version
PHP 7.0.12-1+deb.sury.org~trusty+1 (cli) ( NTS )
aaemnnosttv commented 7 years ago

Hey thanks for the report.

Would you please provide a little more detail about the context, how to reproduce this, and what is expected?

entr commented 7 years ago

It's simple really.

--url= Pretend request came from given URL. In multisite, this argument is how the target site is specified. -from wp-cli docs

So if one do $ wp login as adm1n --url=localhost:8080 (s)he you would expect the generated login url to be http://localhost:8080/df28230f/b1a61d228c-63e276ea-151b5a3k/

Imagine you ran $ wp server and want to generate a link for it. Hope that makes sense. Cheers.

aaemnnosttv commented 7 years ago

Care to give #15 a test and see if that works for you?

entr commented 7 years ago

Working for me. Thanks!