-
Notifications
You must be signed in to change notification settings - Fork 124
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
Remove console flow #140
Remove console flow #140
Conversation
Codecov Report
@@ Coverage Diff @@
## master #140 +/- ##
===========================================
- Coverage 75.62% 30.98% -44.65%
===========================================
Files 8 8
Lines 1633 1630 -3
===========================================
- Hits 1235 505 -730
- Misses 398 1125 +727
Continue to review full report at Codecov.
|
Would close #53 |
Did you have any issue getting this to work on a headless machine? I cloned this branch on my headless machine and received an exception that the web server was already in use when trying to authenticate. I like that the console flow allows you to easily authenticate in terminal if you're using
|
That's v weird. It works fine for me in headless:
Is yours a one-off or something repeatable? If the latter, we could deprecate and change the default, but leave the |
@craigcitro I believe I put the console flow in based on a conversation with you. Thoughts on this change? |
In general, assuming that the user is at the same machine as the one running their python code is a faulty assumption IMO. That is, I don't believe that the local webserver flow handles all cases that the console flow does. In particular, here's a simple recipe to reproduce: start a VM anywhere with only SSH access, connect from your laptop via SSH, and run Or, a repro closer to my heart: open https://colab.research.google.com and try from there. There's no way for your local browser to talk to a random webserver started on that machine. (This is one of the reasons that we have some custom auth code in play.) |
@craigcitro when I try in a docker container (#140 (comment)), it prints out a web address whether or not I pass If it doesn't have that in some situations, then I 100% agree with you. My point is based only there being a fallback, rather than whether that fallback is required. |
@maxim-lian It will always print out a web address; one of the query parameters in that address is the
So if you opt to go with the local server flow, and there's no way for your browser to communicate with that "local" server, then you can no longer do user-based authentication. |
@craigcitro Ah! I see. Even though the initial link is to Would you prefer the default stayed as-is? |
@maxim-lian No problem at all! 😁 I've been doing oauth2-related things since, like 2011, and I still get confused regularly. (But hey, job security!) I think not using a local webserver is the right default. My $0.02:
I've copy-pasted enough auth codes to last me a lifetime, but I don't fancy users getting stuck. WDYT? |
Super, agree. Closing |
The Console Flow is a strict subset of the functionality of the Local Webserver - if the browser fails to open, it's exactly the same. It makes writing parameterized tests harder, and is a small contributor to overall gunk