uProxy-p2p icon indicating copy to clipboard operation
uProxy-p2p copied to clipboard

Make login button issue a URL re-load each click

Open iislucas opened this issue 12 years ago • 5 comments

If a login oauth page fails to load, then clicking on the login button just takes you back to the tab that has a page that failed to load. Instead, I suggest that the connect to a network should issue a URL reload on each login click. That way if the first auth page load fails, the user doesn't get stuck.

iislucas avatar Nov 01 '14 02:11 iislucas

Another variation of this is if you click Login, then in the login tab change the URL to visit some other page - in that case clicking Login again should return you to the intended login page (e.g. google account chooser)

dborkan avatar Nov 05 '14 23:11 dborkan

No, in that case it should open a new tab with google login url.

salomegeo avatar Nov 06 '14 00:11 salomegeo

In progress here: https://github.com/uProxy/uproxy/pull/566

We've bounced between solutions but the most recent stream of thought suggests:

  • launch a new tab each time Connect is clicked
  • don't keep track of the newest auth tab's ID; this means
    1. we cannot activate an open auth tab (but that's ok because we're always launching a new tab)
    2. we will allow any open auth tab to login (i.e. don't check if the tab being redirected to our login page has a specific ID)
    3. onTabClose needs to be edited so that closing one of several auth tabs does not remove the onTabChange listener (which should continue to listen for changes in remaining auth tabs)

One way to address 3) is to remove the onTabClose listener entirely, add the onTabChange listener when ChromeTabAuth is created, and just always keep that listener alive. Or we can add the onTabChange functionality to the chrome.webRequest.onBeforeRequest listener inside background.ts, since it already checks for all redirects.

One problem with this solution is that we will no longer be able to give a "Login abandoned" error that is currently fired when an auth tab is closed. A potential workaround is to keep track of all auth tabs and display that error if all auth tabs are closed (seems suboptimal).

lucyhe avatar Nov 18 '14 22:11 lucyhe

Unclear that a "login abandonded" notification when a user closes a tab is a useful thing; after all they have just closed the tab. :)

iislucas avatar Nov 18 '14 22:11 iislucas

Further progress on this is waiting for freedom 0.6, in case that affects OAuth.

lucyhe avatar Dec 02 '14 16:12 lucyhe