应用程序终止后,microsoft azure清除cookie

时间:2021-10-05 23:12:17

I have implemented microsoft azure sdk for authentication in our app. All done well.

我在我们的应用程序中实现了microsoft azure sdk进行身份验证。一切都做得很好。

But when user logged out I used this code

但是当用户注销时我使用了这段代码

    NSError *error;
    [[ADKeychainTokenCache defaultKeychainCache] removeAllForClientId:[[NSUserDefaults standardUserDefaults] valueForKey:@"azureClientId"] error:&error];

So if user stays on active and again if he would logs in then microsoft azure is able to get user info without entering credentials again.

因此,如果用户保持活动状态,如果他将登录,那么microsoft azure能够获取用户信息而无需再次输入凭据。

but when app terminates and open again, asking for password.

但当应用终止并再次打开时,要求输入密码。

I dont want to ask credentials again.

我不想再问凭证。

Is there any problem with my logout code?

我的退出代码有什么问题吗?

1 个解决方案

#1


1  

You can't generally log out of a social provider - the functionality does not exist. Explicitly, the auth information is stored in the UIWebView, generally as a cookie. This is then passed onto the auth provider next time and the auth provider uses this information to silently authenticate you.

您通常无法注销社交提供程序 - 该功能不存在。显式地,auth信息存储在UIWebView中,通常作为cookie存储。然后,下次将其传递给auth提供程序,并且auth提供程序使用此信息以静默方式对您进行身份验证。

#1


1  

You can't generally log out of a social provider - the functionality does not exist. Explicitly, the auth information is stored in the UIWebView, generally as a cookie. This is then passed onto the auth provider next time and the auth provider uses this information to silently authenticate you.

您通常无法注销社交提供程序 - 该功能不存在。显式地,auth信息存储在UIWebView中,通常作为cookie存储。然后,下次将其传递给auth提供程序,并且auth提供程序使用此信息以静默方式对您进行身份验证。