nolanlawson / pinafore

Alternative web client for Mastodon (UNMAINTAINED)
https://pinafore.social
GNU Affero General Public License v3.0
1.02k stars 176 forks source link

Add login mode compatible with KaiOS #1542

Closed nolanlawson closed 3 years ago

nolanlawson commented 5 years ago

For environments like KaiOS especially, it would be useful to have another way to log in. I cannot seem to get KaiOS to work with the current login structure, because KaiOS is very particular about whether the app mode shows the onscreen cursor or not, and Mastodon's login page only works with the cursor whereas I would like for it to work without the cursor.

As a workaround, the flow could be:

  1. Open a new tab/window with the login page
  2. Show the code
  3. The user copies it
  4. The user goes back to Pinafore
  5. The user pastes in the code

This would be useful for more environments than just KaiOS – on iOS, for various inexplicable reasons, the regular OAuth flow just doesn't work sometimes. This would function as a workaround.

nolanlawson commented 5 years ago

As described in https://github.com/nolanlawson/pinafore/issues/1552 this doesn't really solve anything for KaiOS and arguably makes the code a lot more complex, so removing for now

nolanlawson commented 5 years ago

The real goal of this bug is to fix KaiOS login. Unfortunately since KaiOS doesn't support global copy/paste, the proposed copy/paste solution doesn't help. We need a better fix.

nolanlawson commented 5 years ago

We could potentially have a service that takes the combination of instance+username+password and then returns an Oauth code. However I would prefer for this to be a separate service because it makes me very nervous to have any nontrivial server-side code in Pinafore, especially code that handles user data like passwords.

Maybe this could be a separate third-party service that I host on Zeit. Or I could only enable it for KaiOS. I'm not sure.

nolanlawson commented 5 years ago

Alternatively, I could open a PR on Mastodon to allow its login page to work in a KaiOS app with the mouse cursor disabled. But this would probably require adding the left-right navigation logic which is a bit nontrivial.

Another alternative is to programmatically enable/disable the mouse cursor when logging in, but doing that requires being a privileged KaiOS app and not a hosted app. It seems unlikely to me that KaiOS would grant Pinafore the right to be a privileged app.

nolanlawson commented 5 years ago

Opened a PR on Mastodon: https://github.com/tootsuite/mastodon/pull/12251

nolanlawson commented 3 years ago

This is fixed in Mastodon itself but I never got around to writing a KaiOS app.