C# Azure移动服务-Facebook注销
我使用Azure移动服务Facebook身份验证创建了.NET应用程序。我使用了凭证:C# Azure移动服务-Facebook注销,c#,facebook,azure,C#,Facebook,Azure,我使用Azure移动服务Facebook身份验证创建了.NET应用程序。我使用了凭证: // Login with the identity provider. user = await App.MobileService .LoginAsync(provider); // Create and store the user credentials. credential = new PasswordCredential(
// Login with the identity provider.
user = await App.MobileService
.LoginAsync(provider);
// Create and store the user credentials.
credential = new PasswordCredential(provider,
user.UserId, user.MobileServiceAuthenticationToken);
vault.Add(credential);
如何注销?MobileServiceClient.Logout 文档:使用 此方法在调用MobileServiceClient.Logout方法以将用户注销Azure移动服务实例之前,清除身份提供商设置的所有cookie 以下代码示例显示iOS平台的注销方法:
public void Logout()
{
foreach (var cookie in NSHttpCookieStorage.SharedStorage.Cookies) {
NSHttpCookieStorage.SharedStorage.DeleteCookie (cookie);
}
App.Client.Logout ();
}
public void Logout ()
{
CookieManager.Instance.RemoveAllCookie ();
App.Client.Logout ();
}
public void Logout()
{
...
AzureTodo.App.Client.Logout();
}
Android平台的代码:
public void Logout()
{
foreach (var cookie in NSHttpCookieStorage.SharedStorage.Cookies) {
NSHttpCookieStorage.SharedStorage.DeleteCookie (cookie);
}
App.Client.Logout ();
}
public void Logout ()
{
CookieManager.Instance.RemoveAllCookie ();
App.Client.Logout ();
}
public void Logout()
{
...
AzureTodo.App.Client.Logout();
}
Windows Phone 8.1平台的代码:
public void Logout()
{
foreach (var cookie in NSHttpCookieStorage.SharedStorage.Cookies) {
NSHttpCookieStorage.SharedStorage.DeleteCookie (cookie);
}
App.Client.Logout ();
}
public void Logout ()
{
CookieManager.Instance.RemoveAllCookie ();
App.Client.Logout ();
}
public void Logout()
{
...
AzureTodo.App.Client.Logout();
}