Can't retry login if I close the tab
Seen with new Google Oauth tabs, added in https://github.com/uProxy/uproxy/pull/320. If I click login, then close the tab that opens, then click login again nothing happens. Eventually something times out and I see an error and after that can open the login tab again.
We should fix this by ensuring that clicking login always shows a login tab. Some ideas:
- Ideally, if the user clicks login while the login tab is already open, that tab should be put in focus. If they click login and the tab isn't open, we should open a new tab. This would depend on us being able to detect which tabs are open and change the focus.
- If that doesn't work, we could try just launching a new tab each time they click open, and getting rid of the current timeout logic. Then we will just have to recover gracefully if they enter credentials in multiple login tabs.
I like first proposal, problem with launching a new tab every time is that uproxy should be accepting sign in credentials from one tab.
also if any given time tab is closed we should detect it and throw an error/reject sign in promise or whatever.
@zahoriea @dborkan
I'm doing this, any objections?
SGTM
SGTM also