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

Use browser when adding Google account on Android One

Open palopezv opened this issue 2 years ago • 12 comments

Checklist

  • [X] I have used the search function to see if someone else has already submitted the same feature request.
  • [X] I will describe the problem with as much detail as possible.
  • [X] This issue only contains a request for one single feature, not multiple (related) features.

App version

6.201

Problem you are trying to solve

In order to link a Gmail account to K-9 you have to login using the Google Services OS services, which in practice links up your phone to another account with the consequences it entails: Duplicate calendars, contact lists, and additional services irrelevant to the workings of my phone as I like it. On the other hand, I have secondary Gmail addresses where I receive email. As it is, you have to go through the movements, make sure K-9 works well with that account and then delete said Google account; but your device has already been registered to that account in Google, not nice.

Suggested solution

Create an option for "private login" using a Chrome Tab to retrieve the OAUTH 2.0 token. As an example: This is already implemented in Aqua Mail.

Screenshots / Drawings / Technical details

No response

palopezv avatar Jul 15 '22 21:07 palopezv

On my devices K-9 Mail happily adds Gmail accounts that aren't added as device accounts. Are you saying that's not the case for you?

cketti avatar Jul 15 '22 21:07 cketti

Yes. For some reason it is forcing full Google Services linkup. I'm using a device with Android One 10.

palopezv avatar Jul 15 '22 21:07 palopezv

Interesting. Can you record a video of adding a Gmail account to K-9 Mail?

As a workaround, you could try making another browser (e.g. Firefox) the default before adding an account to K-9 Mail.

cketti avatar Jul 15 '22 21:07 cketti

I'll be! I've just tried an account I use one in a full moon and the option for private login showed up. Hmmm. I may have some leftover data from the previous K-9 versions I removed before installing v6. I'll try to purge as much as I can and report back.

palopezv avatar Jul 15 '22 21:07 palopezv

Sigh. It was a false alarm. I'll try to record a video this weekend and upload it.

palopezv avatar Jul 15 '22 21:07 palopezv

@cketti I have the video but it contains too much personal information. How can I deliver it to you?

palopezv avatar Jul 16 '22 18:07 palopezv

If it's not too large you can send it to [email protected]. Otherwise upload it somewhere and send me the link.

cketti avatar Jul 16 '22 18:07 cketti

From the video it looks like the Google app is intercepting the intent so that the browser isn't launched. I'm guessing this behavior is unique to Android One.

Since I don't have an Android One device I can't reproduce this. If someone affected by this can provide a patch to make K-9 Mail use the browser, I'm happy to merge the change.

cketti avatar Jul 18 '22 13:07 cketti

Could it be possible that the Google app is set as the default app to handle the link? If so, resetting the default apps from the device settings page corresponding to the Google app could help.

ByteHamster avatar Jul 18 '22 16:07 ByteHamster

FWIW, I can't reproduce this on a Nokia 6.1, running Android 10 (Which is afaik an Android One device) in pretty much stock settings (no apps disabled, no firefox installed).

Bubu avatar Aug 13 '22 22:08 Bubu

FWIW, I can't reproduce this on a Nokia 6.1 (Which is afaik an Android One device) in pretty much stock settings (no apps disabled, no firefox installed).

That one originally came with Android 8.1 (Oreo), which could be part of the reason. I'm not sure of the full depths of how the 'in app' browser function worked then compared to Chrome, but I imagine it may have been different from current releases.

lewri avatar Aug 29 '22 10:08 lewri

This weekend I resorted to extreme measures: a full phone cache deletion after removing the K-9 Installation. After rebooting the phone and installing K-9 again, I cannot reproduce either.

Hypothesis: K-9, the version previous to the release adding Microsoft OAUTH2, cached corrupted configuration settings that are not removed even if purging all data by hand in the phone configuration facility.

palopezv avatar Aug 29 '22 12:08 palopezv

I use Firefox as default browser so it uses it for login to Google so it doesn't affect other apps at all

Anutrix avatar Mar 08 '24 06:03 Anutrix

The same can be accomplished with a Chrome page or using a Android System Webview page. Using Firefox is opaque; there is no hint anywhere. Never presume that your users are psychic and can read your intentions and figure out hidden functions just because the author will it.

palopezv avatar Mar 09 '24 14:03 palopezv

@palopezv I don't think K9 opens Firefox specifically, I was just sharing my personal experience. It just opens your default browser as Android's CustomTabs(https://developer.chrome.com/docs/android/custom-tabs) iirc. Both Firefox and Chrome implement it. Not sure about other browsers.

Anutrix avatar Mar 12 '24 14:03 Anutrix