tuskyapp / Tusky

An Android client for the microblogging server Mastodon
https://tusky.app
GNU General Public License v3.0
2.46k stars 387 forks source link

Browser-based login does not work #4592

Open puckipedia opened 1 month ago

puckipedia commented 1 month ago

Detailed description

When I return from browser-based OAuth, the domain, clientId, and clientSecret variables are all blank (never persisted to storage), and authentication fails with "An unidentified authorization error occurred.".

Steps to reproduce the problem

No response

Debug information

Tusky Test 26.0-0f3dd64c Google Pixel 6 Android version: 14 SDK version: 34

The account is on my own server software, which implements the right API contract for returning an OAuth code to Tusky (verified with a debugger).

Tak commented 1 month ago

Hi, have you also tried the "Login with Browser" item from the three-dots menu on the login screen?

puckipedia commented 1 month ago

Yes, that's what I meant with "Browser-based OAuth".

Tak commented 1 month ago

Ok, but then it does work with the default embedded webview?

puckipedia commented 1 month ago

No; using the embedded webview on my server shows the following (which is correct, it requires Basic auth and, sometimes, webauthn): Screenshot_20240805-150941

And using the browser lets me log in, but returns "An unidentified authorisation error has occurred", which, after running Tusky in a debugger, is caused by the issue I specified in the issue.

puckipedia commented 1 month ago

In fact, testing with the most recent version of Tusky available in F-Droid (26.0), I cannot even log in to mastodon.social using the browser based flow, as the issue I mentioned isn't caused by any API call.

charlag commented 1 month ago

just tried m.s. with tusky 26 from f-droid and it works. probably the only difference between your setup and mine is WebView

charlag commented 1 month ago

oh sorry you meant browser-flow, missed that

charlag commented 1 month ago

can confirm, browser-based login didn't work for me with m.s.

Screenshot_20240805-155121

tiptoptom commented 1 month ago

Could this be the problem? https://github.com/zacharee/MastodonRedirect/issues/25

edwardp3 commented 3 weeks ago

Having same issue with browser-based login. Same error as per @charlag above. Android 10, version 26.0 of Tusky app.

ma3s7r0 commented 2 weeks ago

Same problem here, pixel 8, latest os, tusky 26.1, can’t login to chaos.social.