bleakgrey / tootle

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

Login Fails For Accounts With Two-Factor Enabled If User Isn't Previously Logged In From Browser #15

Closed BrainBlasted closed 6 years ago

BrainBlasted commented 6 years ago

Here's the error: "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."

bleakgrey commented 6 years ago

The current login method is the only way to support two-factor authentication, so it can't be the problem. It's probably the temporal access token that got invalidated.

Try running dconf reset -f /com/github/bleakgrey/tootle/ and trying again. Please do that in the terminal and post here the log if the error still occurs.

BrainBlasted commented 6 years ago

Looks like I needed to be logged in first. Changing title appropriately

bleakgrey commented 6 years ago

Yes, the app needs to be authorized through browser. No other method, unfortunately. Did it work?

BrainBlasted commented 6 years ago

Hmm. Tried again on another instance and it failed. What I did previously was type the instance, let it open in browser, then log in. That is when I saw the error above. Then, I tried again once I was already logged in to the instance. It opened the auth request in the browser, and since I was already loggged in I was able to authorize tootle. Tried again with a seperate instance and the same process fails, still showing the error above.

The log is not informative:

[INFO 13:42:42.137940] Application.vala:154: Tootle version: 0.1.0
[INFO 13:42:42.137984] Application.vala:156: Kernel version: 4.16.8-gnu-1
(com.github.bleakgrey.tootle:1594): Gtk-DEBUG: 13:42:42.170: Connecting to session manager
[FATAL 13:42:42.241520] granite_widgets_mode_button_set_active: assertion '_tmp3_' failed
bleakgrey commented 6 years ago

As far as I can see, there's no errors that indicate failed auth attempt.

To authrorize the app access one needs to be logged in on an instance in a browser so Tootle would request the access to the account (thus the code that needs to be copied and pasted). Assuming the auth code is valid for the current instance in the browser, authorization should be successful.

BrainBlasted commented 6 years ago

The issue is that the instead of producing the auth code, the instance fails to show the option to authorize the apps at all, so one does not get an auth code to paste.

bleakgrey commented 6 years ago

Well that's weird. Which instance are you trying logging in to? What is your OS?

BrainBlasted commented 6 years ago

floss.social. Parabola GNU/Linux-libre. This instance works with other Mastodon clients.

BrainBlasted commented 6 years ago

Including mine, Trumpet. The process works regardless of if I'm already logged in from the browser.

bleakgrey commented 6 years ago

I just registered there and logged in successfully :/

bleakgrey commented 6 years ago

Oh, okay, now it happens for me as well. I guess I just need to regenerate the client id each time the instance is switched.

bleakgrey commented 6 years ago

Please compile the master branch and see if this behavior still happens. Before your do that though logout from your account and run dconf reset -f /com/github/bleakgrey/tootle/ once more.

bleakgrey commented 6 years ago

Does this issue still occur?

bleakgrey commented 6 years ago

Assuming it's a no then