I play with OpenID Connect and OAuth, and I want to support several OpenID providers (therefore not only those that are known by AccountManager). However, I ran into this problem.
When you authenticate Google as an installed application, you pass the callback address that is predefined (from Google) to http://localhost . So, I start the OAuth thread by redirecting the Google endpoint as follows:
String url = "https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&state=%2F&redirect_uri=http%3A%2F%2Flocalhost%3A9999&response_type=code&client_id=000000000000000.apps.googleusercontent.com"; Intent i = new Intent (Intent.ACTION_VIEW); i.setData (Uri.parse (url)); startActivity (i);
Note that I pass redirect_uri as needed (port 9999, which is allowed). I registered an application to respond to this type of download address as follows:
<data android:scheme="http" android:host="localhost" android:port="9999" />
However, this forces the system to display the βFull action withβ dialog:

So, since there is nothing on the phoneβs port 9999, if the user selects a browser, the error page will be displayed by the browser and the entire authentication flow will be disrupted.
How can i avoid this?
Shade source share