xamarin / Xamarin.Auth

Xamarin.Auth
Apache License 2.0
542 stars 350 forks source link

How to completely wipe the CustomTab created by Xamarin.Auth from back history? #439

Open winstonpang opened 4 years ago

winstonpang commented 4 years ago

Xamarin.Auth Issue

Version

Steps to reproduce

Using the standard boiler plate of getting Auth running.

Specifically to bring up the CustomTab page:

return new OAuth2Authenticator( _authConfig.ClientId, null, string.Join(" ", AuthConfig.Scopes), new Uri(_authConfig.AuthServerBaseUrl), new Uri(_authConfig.RedirectUri, UriKind.Absolute), new Uri(_authConfig.AccessTokenServerBaseUrl), null, false) { AllowCancel = true, ClearCookiesBeforeLogin = true, };

Expected behaviour

After authentication is successful, and you have navigated to a new Activity, pressing back should not show the CustomTab with the login page in it.

Actual behaviour

When you have finished authenticating and after Authenticator.OnPageLoading is invoked in your CustomInterceptorActivity, bringing up a new Activity with intent options ClearTop does not remove the CustomTab instance (the view that shows your login page), i.e. when you are in the next activity that you show, pressing back goes back to this CustomTab

Feature description

Write a description of the feature. How should it work? How should it look? Include some graphics if this could help!