Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document --no-browser still requires execution on same system as browser #55

Open
jtackaberry opened this issue Feb 16, 2023 · 4 comments

Comments

@jtackaberry
Copy link

jtackaberry commented Feb 16, 2023

Running mozwire v0.8.1 on a remote system:

$ ./mozwire --print-token --no-browser
Please visit https://vpn.mozilla.org/api/v2/vpn/login/linux?code_challenge_method=S256&code_challenge=<redacted>&port=40715.

Then visiting this URL from my browser, I get a "Sign-in successful" response with the message "Please return to the Mozilla VPN app to complete setup." But mozwire never terminates.

In fact, strace shows it isn't polling a remote endpoint, so it's not really clear to me how this works or what the expected result is?

@NilsIrl
Copy link
Owner

NilsIrl commented Feb 16, 2023

The URL needs to be visited from the same system as the one running mozwire.

I'm not sure why it would be polling anything though. (I'll try and have a look later)

@jtackaberry
Copy link
Author

The URL needs to be visited from the same system as the one running mozwire.

Ahh, thanks. I had it in my head that it would work like some other CLI login methods I've used, such as for example Azure CLI login, where the CLI provides a URL you authenticate via browser and the CLI keeps polling until successful, so the browser and CLI don't need to be on the same system. (Important when logging in remotely.)

I ran mozwire from my laptop instead of the remote system and it works.

I'm not sure why it would be polling anything though. (I'll try and have a look later)

Sorry if I was ambiguous -- it's not polling, that's just how I expected it to work given my experience with other CLIs.

It might be worth adding a note to the README saying that --no-browser doesn't support remote execution, and that you still need to run mozwire on the same host as the browser?

Thanks!

@jtackaberry jtackaberry changed the title mozwire --print-token never terminates Document --no-browser still requires execution on same system as browser Feb 17, 2023
@jtackaberry
Copy link
Author

Updated the context of the issue to be a doc update in case there's some value to other users, but naturally please ignore/close if you feel my misunderstanding isn't likely to translate to other users

And thanks for MozWire! I love that this lightweight tool exists for managing Mozilla's VPN.

@edent
Copy link

edent commented Mar 14, 2023

This caught me out as well. I had to generate the token on one machine and then copy it to the target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants