You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2021. It is now read-only.
If you also have the Xamarin.Auth component, you can delete it yourself.
I have done it like this in a Xamarin.Forms app:
vartheChangeAccountButton=new Button {TextColor= Color.White,Font= Font.OfSize(textFont, textSize),Text="Change account",BackgroundColor= Color.Transparent,};stringflickrUser="";if(accounts.Count()>0){flickrUser= accounts.First().Username;
theChangeAccountButton.Text ="Logout of "+flickrUser;}else{
theChangeAccountButton.IsVisible =false;}
theChangeAccountButton.Clicked +=(sender,e)=>{varstore= AccountStore.Create();IEnumerable<Account>accounts= store.FindAccountsForService("Flickr"); Console.WriteLine("Number of flickr accounts before is "+ accounts.Count().ToString());AccountthisAccount;if(accounts.Count()>0){for(inti=0;i<accounts.Count();i++){thisAccount= accounts.First(); store.Delete(thisAccount,"Flickr");}}accounts= store.FindAccountsForService("Flickr"); Console.WriteLine("Number of flickr accounts afterwards is "+ accounts.Count());if(accounts.Count()==0){ theChangeAccountButton.IsVisible =false; DisplayAlert("Flickr","You are logged out of "+flickrUser+".","OK");}else{ DisplayAlert("Flickr","For some reason, that didn't work.","OK");flickrUser= accounts.First().Username; theChangeAccountButton.Text ="Logout of "+flickrUser;}};
When there are no flickr users saved, the button is hidden. When there is at least one, the button shows "Logout of user@domain.com". Normally, there's just one, so handling multiple flickr accounts is just for robustness.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If an account goes bad, then we need a way to delete them from the account store.
The text was updated successfully, but these errors were encountered: