xamarin / Xamarin.Auth

Xamarin.Auth
Apache License 2.0
541 stars 351 forks source link

Xamarin.Android: User cannot login with Edge browser (using native UI) #375

Open tipa opened 5 years ago

tipa commented 5 years ago

Xamarin.Auth Issue

Version

Steps to reproduce

  1. Edge set as standard browser
  2. snippet:
    
    var authenticator = new OAuth2Authenticator(
    clientId + ".apps.googleusercontent.com",
    clientSecret,
    permission,
    new Uri(GoogleAuthConsts.OidcAuthorizationUrl),
    new Uri(RedirectUri),
    new Uri(GoogleAuthConsts.TokenUrl),
    null, true);

Authenticator = authenticator; authenticator.Error += (s, e) => sema.Release(); authenticator.Completed += (s, e) => { if (e.IsAuthenticated && e.Account.Properties.ContainsKey("code") && e.Account.Properties.ContainsKey("state")) { authReponseUrl = new AuthorizationCodeResponseUrl() { Code = e.Account.Properties["code"], State = e.Account.Properties["state"] }; } sema.Release(); };

activity.StartActivity(authenticator.GetUI(activity));



Redirect-Activity is set up (but is never called) -  the login *works* with Google Chrome as standard browser

Platform:
-   [x] Xamarin.Android = 9.1.7.0 

### Expected behaviour
User can log in and give the app the needed permissions and the app is reactivated

### Actual behaviour
User can sign in (enter email & password), but on the permission page, when clicking "Allow", the browser shows a loading progress bar and at some point navigates to the Google website - without reactivating the app.

This issue might be related to: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/958

![Screenshot_20190329-102320_Edge](https://user-images.githubusercontent.com/2863198/55222953-68558b80-520d-11e9-993a-b94057ef1705.jpg)
mjfara commented 5 years ago

Having this same issue with Edge, works great with Chrome.

moljac commented 5 years ago

Adding support for Edge, Opera will be a lot of work. see https://github.com/xamarin/Xamarin.Auth/issues/377

chrisfoulds commented 5 years ago

Is there a way to force the auth you to use Chrome as this is happening alot.