mastodon-android icon indicating copy to clipboard operation
mastodon-android copied to clipboard

OAuth login flow closes when backgrounding the app to get 2FA code, and then resuming via the app icon

Open TobyDevelopment opened this issue 1 year ago • 2 comments

Description: When logging into the Mastodon Android app using my existing account with 2FA, the OAuth login flow closes when resuming via the app icon. This result in having to start the login process from scratch.

Steps:

  1. Open the app and select Login
  2. Pick the server and select Next
  3. Enter email and password
  4. When on the 2FA step background the app to get the code
  5. Come back to the app by tapping the app icon on the home screen
  6. The app will be back on the previous server selection page instead of the 2FA step

This issue does not seem to happen when resuming the app from the app switcher.

TobyDevelopment avatar Nov 26 '24 04:11 TobyDevelopment

Authentication happens in your default browser. If you have the "open links in" setting set to "system browser", it affects that too. ("In-app browser" is still your default one, but in the "custom tabs" mode for a more integrated experience)

grishka avatar Nov 26 '24 04:11 grishka

The OAuth login flow opens up within the app in a Chrome Custom Tab. It is not going to an external browser.

The app seems to resume correctly if using the app switcher but not when tapping the app icon if that helps.

TobyDevelopment avatar Nov 26 '24 04:11 TobyDevelopment