AppAuth-Android icon indicating copy to clipboard operation
AppAuth-Android copied to clipboard

Google forbids Huawei devices from using GMS, so how to control the browser when AppAuth works on these devices?

Open ttljtw opened this issue 2 years ago • 8 comments

Checklist:

  • [x] I am using the latest release
  • [x] I searched for existing GitHub issues
  • [x] I read the documentation
  • [x] I verified the client configuration matches the information in the identity provider (or I am using dynamic client registration)
  • [x] I am either using a custom URI scheme or https with App Links for client redirect.
  • [x] I can reproduce the issue in the demo app (optional)

Configuration

  • Version: 0.11.1
  • Integration: native(Java)
  • Identity provider: Google

Issue Description

I use a new Huawei device for application adaptation. My application requires a specified browser. Generally, we specify the pre installed Chrome browser of Android. But as you know that Huawei devices do not have GMS and will not be pre installed with Chrome. It is pre installed with Huawei browser. You can't expect every user to install Chrome on their devices. Therefore, can the parameters of Huawei browser be added to the versionedbrowsermatcher, so that this project is more perfect and more convenient for everyone to use.

ttljtw avatar Mar 23 '22 13:03 ttljtw

Not sure what you're asking here. VersionedBrowserMatcher is just used to control BrowserAllowList/DenyList.

Out of the box you shouldn't restrict the browser list for best compatibility as the browser selector will just match available browsers in the order returned by the system.

This lib is not Chrome-specific or require GMS, though if you depend on AppLinks best support is provided by Chrome or forks of it.

agologan avatar Mar 27 '22 08:03 agologan

Yes, I don't think it's a bug. However, as an open source project, should developers be reminded in the README that there is restriction on some browser, which will lead to the decline of some user experience. For example, image

ttljtw avatar Mar 29 '22 06:03 ttljtw

Not really, it's not like we mention anywhere you need Chrome, and in all fairness if you use a custom scheme based URI it should work perfectly in all browsers including just the default webviews some obscure Android installs come with.

agologan avatar Mar 30 '22 17:03 agologan

AppAuth-Android is using Custom Tabs, which is also supported by the Huawei browser for close to two years now. I haven't tested this myself, but it should be working fine for you?

EmDee avatar Apr 11 '22 19:04 EmDee

Yes, I understand what you're saying, if developers don't use advanced configuration(Controlling which browser is used for authorization), they won't be affected. So, I wanted to add a notice to the advanced configuration to be more friendly to developers like me who choose to use the advanced configuration, didn't I?

ttljtw avatar Apr 12 '22 03:04 ttljtw

Yes, I understand what you're saying, if developers don't use advanced configuration(Controlling which browser is used for authorization), they won't be affected.

So, I wanted to add a notice to the advanced configuration to be more friendly to developers like me who choose to use the advanced configuration, didn't I?

Now I get where you are coming from.

I guess it wouldn't hurt anyone, if there's an additional notice, however, I wouldn't mention Huawei specifically, but only state that the defined browsers might not be available on all the devices.

EmDee avatar Apr 12 '22 05:04 EmDee

Now I get where you are coming from.

I guess it wouldn't hurt anyone, if there's an additional notice, however, I wouldn't mention Huawei specifically, but only state that the defined browsers might not be available on all the devices.

So, can I submit a notice to remind other developers of this?

ttljtw avatar Apr 15 '22 06:04 ttljtw

So, can I submit a notice to remind other developers of this?

I'm just another fellow developer. I think you can set up a PR and the maintainers will decide, if it's worth merging.

EmDee avatar Apr 15 '22 07:04 EmDee