firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.28k stars 579 forks source link

Allow developers to specify which application web flows should use for better User experience #2255

Open JagadeeshBabuDamarasingu opened 3 years ago

JagadeeshBabuDamarasingu commented 3 years ago

What feature would you like to see?

With Firebase Auth Verison 20.0.1, this change has been brought.

Fixed a bug that required the inclusion of a browser dependency in the client application. Instead, when Chrome Custom Tabs are not available for web-based flows (such as Generic IDP or reCAPTCHA in Phone Auth), it will fall back to whatever application is the default for the Intent#ACTION_VIEW intent.

source here: Firebase Auth 20.0.1 Release notes

It was mentioned that web-based will fallback to Intent#ACTION_VIEW. This would open a disambiguation dialog and sometimes users weren't aware that this is a part of Authentication flow and dismissing the dialog, and this is resulting in failed authentication. And, we know for sure that some OEMs will have an application that can handle ACTION_VIEW. It would be good if we can explicitly specify the SDK to use that particular application.

How would you use it?

I would like to specify an intent to a particular application capable of handling Intent#ACTION_VIEW based on some checks and expect web-based flows to proceed with the application I specified in intent.

google-oss-bot commented 3 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

malcolmdeck commented 3 years ago

Thanks for bringing this up! It's not clear to our team that allowing the developer to specify which browser to use rather than respecting the default chosen by the user (or lack of default, as it may be) is the right thing to do.

While we consider this further, maybe you can show users a prompt letting them know that they'll be redirected to a browser to complete sign-in before triggering the flow. I'd imagine that users are mostly closing the dialog because they don't know why it's there.

mkubiczek commented 1 year ago

I would also appreciate such feature, basically because our app is a browser already, we would prefer the user to stay in the current browser rather to trip to other one.