bleakgrey / tootle

GTK-based Mastodon client for Linux
GNU General Public License v3.0
404 stars 62 forks source link

Login broken on mobile devices as mastodon wants to use a xdg-open link instead of giving the code #266

Open Alexmitter opened 3 years ago

Alexmitter commented 3 years ago

What should happen:

__ Tootle should understand the xdg-open link from the mastodon login site

What happened instead:

__ It waits forever

How to reproduce:

  1. Use a mobile linux device
  2. Try to login
  3. The site wants to open a xdg-open link, the app wants a code

Build context:

Additional info (if needed):

__ It works fine on the deskop, but somehow the mastodon site really does not want to give the code on the phone so it is impossible to login.

bleakgrey commented 3 years ago

What browser are you using?

Alexmitter commented 3 years ago

@bleakgrey Firefox ESR with the mobile additions, chromium and epiphany. They all get detected to use the mobile mastodon site. With a standard desktop firefox useragent and some tweaking I can get the site to believe I am on a desktop and showing me the code, but thats not a good solution at all I believe.

Alexmitter commented 3 years ago

@bleakgrey I found that the issue and point of confusion is. When logging in and stating the mastodon instance URL, it will try to open the set default brower, in this case firefox but that takes a while on the Pinephone, while that happens in the background I will click on "Try manual authorization", it will try to open firefox again but this time silently fail as one firefox instance is already open, so all you see is the page that was originally opened, the one that will not provide the key but instead tries to open a link with tootle.

Steps to work around that:

  1. Enter mastodon instance URL in tootle
  2. Wait for firefox to open, then close it.
  3. Go back to tootle, click on "Try manual authorization"
  4. Now firefox will open again after some while, this time with the correct web page that will provide the key as it should.

Maybe instead of providing a click-able link under the key input box to "Try manual authorization", put a "Use manual authorization" checkbox under the mastodon instance URL input box.

Justinzobel commented 3 years ago

This is also an issue if you log into your Mastodon instance in a non-default browser. Tootle should offer an option to copy the URL so the user can open it their choice of browser.