如何在身份验证上下文登录 Windows 应用程序中禁用记住我复选框



我在Windows 10通用应用程序中使用身份验证上下文。当我第一次登录时,我选中了记住我,现在每次我注销并尝试登录时,它都会自动登录我而不会提示。如何禁用它?您可以通过以下方式获得相同的提示:

AuthenticationResult result = await authContext.AcquireTokenAsync(graphResourceId, clientId, redirectURI, new PlatformParameters(PromptBehavior.Auto, false));

哦,我很傻,它实际上在参数中:

new PlatformParameters(PromptBehavior.Auto, false);

new PlatformParameters(PromptBehavior.Always, false);

最新更新