Xamarin.Auth: Browser doesn't close itself on Android with native renderers
Xamarin.Auth Issue
IF BUG, INCLUDE THIS PART:
Version
- nuget version = 1.5.0.3
- Xamarin Forms = 2.3.4.270
Steps to reproduce
Call OAuth2Autenticator on Android with native renderers, using presenter or AuthenticatorPage. Custom URL scheme is registered
OAuth2Authenticator authenticator = new OAuth2Authenticator(
"mobile",
"secret",
"openid profile api1",
new Uri(Settings.Server + "/connect/authorize"),
new Uri("myapplogin://localhost/oauth2redirect"),
new Uri(Settings.Server + "/connect/token"),
null,
true);
authenticator.Completed += Authenticator_Completed;
var presenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter();
presenter.Login(authenticator);
``
Custom URL scheme interceptor Activity and Authenticator_Completed are called.
Platform:
- [] .NET version = Xamarin 4.6.0.299
- [] Android SDK = 7.1
- [] Authentication server : custom platform using IdentityServer4
- [] Android : tested on Moto X Android 6.0 with Chrome, and Visual Studio Android Emulator with Android 6.0 and Browser
Expected behaviour
Web browser should close itself after authentication
Actual behaviour
The web browser doesn’t close itself after authentication. This is working well on IOS (both native and not) and on Android when isUsingNativeUi=false

About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 6
- Comments: 24 (5 by maintainers)
@akamud Here is how I’ve been getting around this
AuthTest.zip Here is a complete minimal sample with google login, showing that the login-browser doesn’t Close after successfully completing the login process.
Is anyone working on this?
Can you please tell us about this issue status? Should I use hacks to handle the issue myself or somebody gonna fix it soon in library?
Moving it to High Priority
In order to speed up the bugfixing, please add link to the repo with minimal sample (with removed sensitve data)
To switch back to the previous activity I used
instead of
Finish();@newky2k Still the same with latest version