You can use WP-CLI to generate a magic link URL for any existing user:
magic-login create <user> [--count=<count>]
for example if you want to create a 2 login links for the admin user
wp magic-login create admin --count=2
and output will be something like
http://magiclogin.test/wp-login.php?user_id=1&token=fcabf23adb243ca2fb6f34799c68bea602c79d2a
http://magiclogin.test/wp-login.php?user_id=1&token=9d2471434e348e02d288fa0acf4b7ebe7c8d81ca
In version 1.3.1, `redirect-to` parameter has been added! You can easily specify the redirection URLs.
Example:
wp magic-login create admin --count=1 --redirect-to='https://example.org/'
You can pass the optional --send
parameter if you want to send the login link right away.
Bulk Login URLs:
If you need to create role based urls for the group of users, you can do that too.
wp magic-login bulk-create --format=csv --role=contributor > login-links.csv
PS: The login links generated via CLI will skip the IP Check even if you have enabled that option.