tuskyapp / Tusky

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

Default to Login with Browser if Calckey instance #3316

Open ThatOneCalculator opened 1 year ago

ThatOneCalculator commented 1 year ago

In the development branch of Calckey, we added inital support for Mastodon auth and API, and it works in apps like Megalodon, tooot, Elk, etc. It seems the URL tusky uses for authentication causes Calckey to error out though.

Screenshot_20230212-154029.png

connyduck commented 1 year ago

Sounds like a Calckey issue though?

ThatOneCalculator commented 1 year ago

Other clients handle it perfectly fine though, maybe see if nodeinfo shows software is "calckey", open the auth window in the browser instead of the embedded WebView?

connyduck commented 1 year ago

Can you tell me what calckey instance I can use to debug this please? I don't think we will add special handling just for calckey though.

ThatOneCalculator commented 1 year ago

https://stop.voring.me (recommended) or https://bz.pawdev.me

ThatOneCalculator commented 1 year ago

Update: someone in the comments to my post pointed out that you can hit the 3 dots in the top right to log in with browser -- this option works great! I think a simple nodeinfo check to see if software is calckey, then to use that option if true would be enough to provide a smooth option for Calckey users.

Screenshot_20230213-152017.png

connyduck commented 1 year ago

For whatever reason Calckey login needs Local Storage to work, but if I enable that it fails with another JS error

Screenshot 2023-02-14 at 19 12 43

We should switch back to Custom tab being the default login I guess

ThatOneCalculator commented 1 year ago

I'm not sure what the service worker error is about, but custom tabs would work.

ThatOneCalculator commented 1 year ago

@connyduck any chance we can see an update on this? Should be a relatively simple fix, and Calckey is even more compatible with the Mastodon API now.

ThisIsMissEm commented 7 months ago

@ThatOneCalculator Object.fromEntries is a relatively new ECMAScript API, so the error here could be that that version of the browser being used by the operating system doesn't support — it may need a polyfill

https://caniuse.com/?search=object.fromEntries