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

Remote server option --noauth_local_webserver missing #734

Closed
pwoefhidkln opened this issue Sep 6, 2024 · 6 comments · Fixed by #739
Closed

Remote server option --noauth_local_webserver missing #734

pwoefhidkln opened this issue Sep 6, 2024 · 6 comments · Fixed by #739
Assignees
Milestone

Comments

@pwoefhidkln
Copy link

I'm running version v4.0.4 quite happily using --noauth_local_webserver

I've just installed v4.4.0 but the option has disappeared and I can no longer authenticate.

Has it been dropped or just missed out?

@dbarnett
Copy link
Collaborator

dbarnett commented Sep 6, 2024

Hmm, it was removed intentionally as part of #683, unsure whether there's still a way to support it in the new google_auth_oauthlib mechanism but either way I'm hoping to get a 4.5 release out in the coming weeks and can see if a fix for local webserver is feasible as part of that.

I'm a little surprised it's been working for you recently on the old version, thought I saw something about that mechanism going away completely… Can I check in with you here next week for a few more details about your use case and how it's worked in the past?

And I assume in the meantime you have a way to downgrade and keep using the old version that you said is still working for your case?

@pwoefhidkln
Copy link
Author

pwoefhidkln commented Sep 7, 2024 via email

@dbarnett dbarnett added this to the 4.5 milestone Sep 7, 2024
@dbarnett
Copy link
Collaborator

dbarnett commented Sep 10, 2024

K I had a look through details and options here...

First the bad news: AFAICT, like dgrieser said in the PR, it's literally impossible to support the same exact usage model of a --noauth_local_webserver arg. The old option seemed to depend on remote Google servers to relay the connection and would be brittle-to-impossible to try to hack into the google_auth_oauthlib client.

The good news: it's not that hard to get the same effect with SSH port forwarding (like ssh -L 8080:localhost:8080 <host>), AND we might be able to add some convenience helpers to make it a smoother transition for folks used to using that option.

The one complication is deciding which direction to tunnel: in the case of your Pi you'd want to tunnel IN from another system, whereas in other cases it might be more convenient to tunnel OUT to a remote host, and maybe even automatically launch a browser pointed at the auth URL.

Either way, I think it'd be worth making it accept the --noauth_local_webserver arg and spit out suggestions for how to connect to it remotely. LMK if you have any suggestions for preferred instructions or helpers you'd want to see in your case.

@dbarnett
Copy link
Collaborator

K, dunno if it'll scratch your exact itch but I got some quality-of-life improvements for those cases that'll be incorporated into the upcoming 4.5 release. Still gotta copy-paste commands, but should give you a great head start spitting out some example commands with port numbers and such values filled in.

I guess my suggested ssh commands aren't too portable to Windows etc probably, but it's way better than just blowing up with a "no such arg" error.

@pwoefhidkln
Copy link
Author

That's great, thanks!

@dbarnett
Copy link
Collaborator

On second thought, there may be some gotcha I'm missing but it seems like it still could work without a tunnel if the devices are on the same network and the remote host can reach the system running gcalcli, where currently we hard-code the target to localhost.

Might revisit that design later if it the SSH tunnel process is still particularly annoying for folks.

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

Successfully merging a pull request may close this issue.

2 participants