Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

Remember Last Logged In User After Signout in Xamarin Forms

$
0
0

Hi,

We are using Azure AD to authenticate the user in our Xamarin forms app and what we want to achieve in our UWP app that if one user lets says signed in the app and then signed out. On Next login flow Azure AD should show list of user who were logged in on that particular device so user can pick the user and just enter password. 

In our case if we signout the user then it always start the flow from asking the email

Here is code snippet for signout

AuthenticationContext authContext = new AuthenticationContext($"{tenantUrl}/{tenantId}");
                authContext.TokenCache.Clear();

                Windows.Web.Http.Filters.HttpBaseProtocolFilter myFilter = new Windows.Web.Http.Filters.HttpBaseProtocolFilter();
                var cookieManager = myFilter.CookieManager;
                var cookieUri = new System.Uri(tenantUrl);
                HttpCookieCollection myCookieJar = cookieManager.GetCookies(cookieUri);
                foreach (HttpCookie cookie in myCookieJar)
                {
                    cookieManager.DeleteCookie(cookie);
                }

P.S: Expecting to be issue for UWP AD Package since its working fine on iOS


Arslan Pervaiz
_______________________________
Mark As Answer If It Helps You



Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>