shouldn't need to close window and press enter after authenticating
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
Fix Released
|
Low
|
Leonard Richardson |
Bug Description
As a kind of alternative to the approach of bug 532055:
When I start a new launchpad client app for the first time, I need to authorize that app. Fair enough. What should happen is
1- If I am not already logged in to Launchpad, I need to log in through my chosen identity provider in a browser window. Often this step will be unnecessary because my browser will already be logged in.
2- I should click one button to say "yes, I authorize $app to do $thing"
What happens now is these two plus also
0.5- Sometimes I need to dig around to find the browser window
3- I need to close the browser window and go back to my app
4- Typically I need to then press Enter in the terminal window
This could be improved by:
* launchpadlib should poll launchpad to find out whether the token has been accepted, refused, or an error has occurred; then there's no need for the client to tell the client app that they pushed the button
* the browser window should automatically close after choosing to either accept or deny the request
* if possible the web page should open in a new browser window (not a tab) and that window should be raised to the front
Related branches
- Martin Pool (community): Approve
-
Diff: 268 lines (+68/-32)4 files modifiedsrc/launchpadlib/NEWS.txt (+9/-0)
src/launchpadlib/credentials.py (+36/-13)
src/launchpadlib/launchpad.py (+12/-8)
src/launchpadlib/tests/test_launchpad.py (+11/-11)
summary: |
- launchpadlib login should take less steps + shouldn't need to close window and press enter after authenticating |
Changed in launchpadlib: | |
status: | New → Triaged |
importance: | Undecided → Low |
assignee: | nobody → Leonard Richardson (leonardr) |
status: | Triaged → In Progress |
Changed in launchpadlib: | |
status: | In Progress → Fix Released |
It looks like closing the window is possible but the rules under which you can do it are complicated: basically it seems to be hard to use this if it was the original window that was opened. So perhaps we'll have to leave the user to close it, or perhaps a javascript expert can suggest a way around it.
Polling should at least make it easier to avoid getting the user to specifically press enter, which is probably the bigger problem.