Reputation: 1217
I am using Xamarin.Facebook.iOS SDK (v 4.13.1.0) for Facebook login.
Current scenario: In my app, once user logs in through Facebook credentials and logs out, he can just hit login and get authenticated.
Expected Scenario: Once user logs in through Facebook credentials and logs out, if he wants to login again, he needs to enter his Facebook is and password once again.
Right now for log out I am using the following code:
NSHttpCookieStorage storage = NSHttpCookieStorage.SharedStorage;
foreach (NSHttpCookie cookie in storage.Cookies)
{
if(cookie.Domain == ".facebook.com")
{
storage.DeleteCookie(cookie);
}
}
But this doesn't work. Right now, to get the expected result I have to:
Clearly, its not the best way to get the desired result. Can anyone please advise me a better approach ??
Also, Is there any way I could set expiry date for the Facebook access token that way i could set the expiry date to current date time and let user enter his credentials again next time they login.
Thank you.
Upvotes: 2
Views: 604
Reputation: 36
I upgraded the iPhone with iOS 10.1.1 and now the logout work correctly.
Upvotes: 2