atom / atom.io

🌐 A place for feedback on the atom.io website and package API
158 stars 98 forks source link

Login to teletype succeeds always only after second attempt in browser Falkon 3.0.0 #171

Open gabor-braun opened 5 years ago

gabor-braun commented 5 years ago

Edit by @rsese to add more details and repro steps

Can't reproduce on macOS 10.12.6, reproduced on Ubuntu 18.0.4 with Atom 1.33.0. Also noted that Travis CI for example doesn't have this issue.

Start by making sure the 2 browsers you use are not logged into github.com (I used Firefox 74 and Chromium 71):

  1. apm install teletype
  2. Click the Teletype icon and then click the teletype.io/login link
  3. This should open an oauth signin page in your default browser, copy the URL
  4. Paste the URL into the second browser
  5. Sign in to your github.com account

Expected to be able to login and get token for Teletype, actual behavior as described in https://github.com/atom/atom.io/issues/171#issuecomment-445298535:

The page "You are being redirected" appears for a short time, and it changes to the page "Oops! There was a problem" appears. Click on "try again".

The page "Sign in to Teletype for Atom" appears with a GitHub token (i.e. the second try is successful).

I have tested the above instructions with Chromium being the first browser and Firefox the second, and when Firefox is the first browser and Chromium the second.


Following the sign in link if teletype, it leads to a login page. After entering username and password, it leads to the "Oops! There was an error" page. Clicking on the "try it again" link immediately succeeds with the login, without a request to enter either the username or the password again.

rsese commented 5 years ago

Thanks for the report! Just to confirm, do you see this behavior with other browsers like the latest release versions of Firefox or Chrome, or just Falkon?

gabor-braun commented 5 years ago

With Chromium and Firefox, a page "You are being redirected to the authorized application" s displayed for some time, but not the page "Oops!".

rsese commented 5 years ago

I had a chance to install Falkon on Ubuntu 18.04 but couldn't reproduce - can you think of anything else on your system perhaps that might be related? Or some Falkon setting? If you connect from a different network does that make a difference?

gabor-braun commented 5 years ago

Hmmm... I have made wome further tests, and what I've said was misleading. It seems to be browser independent, and depending on how I access the login page.

Typing in the URL https://teletype.atom.io/login by hand, the login suceeds in all browsers including Falkon.

However, when opeining Atom, clicking on the Teletpye symbol, and then the "Visit teletype.atom..." link, then a login page appears in Konqueror. Selecting in the file menu to open with another browser, then the page opens in the new browser. Providing the username and password, the "Oops! There was the error" page opens. Clicking on the "Try again" link the login succeeds without providing the username or password again. This is the case when the new browser is Chromium, Firefox or Falkon.

Thank you for installing things just to test it out.

rsese commented 5 years ago

Sorry for the delay just circling back to this one - based on this part of your description:

It seems to be browser independent, and depending on how I access the login page.

Can you share step-by-step instructions for reproducing this behavior with Chrome/Chromium or Firefox? I couldn't quite follow your description of how to reproduce with Konqueror.

gabor-braun commented 5 years ago

Can you share step-by-step instructions for reproducing this behavior with Chrome/Chromium or Firefox?

  1. Open https://teletype.atom.io/login in a browser.

  2. Copy the URL from the address bar. For me it was for example in one case

https://github.com/login? client_id=99c5a54e39feda31f25b&return_to=%2Flogin%2Foauth%2Fauthorize%3Fclient_id%3D99c5a54e39feda31f25b%26redirect_uri%3Dhttps%253A%252F%252Fteletype.atom.io%252Fauth%252Fteletype%252Fcallback%26response_type%3Dcode%26scope%3D%26state%3D64b2100af690d2ccca775e017cb047caf782b6d3b887b9fc

  1. Open the copied URL in a second browser.

  2. Enter user name and password. Click on "Sign in".

  3. The page "You are being redirected" appears for a short time, and it changes to the page "Oops! There was a problem" appears. Click on "try again".

  4. The page "Sign in to Teletype for Atom" appears with a GitHub token (i.e. the second try is successful).

I have tested the above instructions with Chromium being the first browser and Firefox the second, and when Firefox is the first browser and Chromium the second.

I couldn't quite follow your description of how to reproduce with Konqueror.

With the above recipe, this is no longer relevant, just for information. In Konqueror one can do steps 2 and 2 in one step: In the File menu select e.g., "Open with Firefox" to open the same page in Firefox.

Best wishes,

Gábor
rsese commented 5 years ago

Thanks for the detailed steps, I can reproduce as described :+1:

I see it's the same error with the GitHub package as well but if you try to authenticate with Travis CI for example, it seems to work ok.