B2C:无法从Edge注销 [英] B2C: Can't sign out from Edge

查看:108
本文介绍了B2C:无法从Edge注销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Azure AD B2C对.Net网络应用的用户进行身份验证。 注册/登录效果很好。 当用户退出时,IE11或Chrome都没有问题。 具有讽刺意味的是,Edge尝试签署用户,但重定向回到
页面中的标志,它被绕过,用户重新进入应用程序。  

I'm using Azure AD B2C to authenticate users for a .Net web app.  Sign up/sign in works great.  When a user signs out, there's no problem from IE11 or Chrome.  Edge, ironically, tries to sign the user out but on redirect back to the sign in page, it's being bypassed and the user gets right back into the app.  

作为参考,这里是代码,它是来自B2C示例Web项目的确切代码:

For reference, here's the code, it's the exact code that came from the B2C sample web project:

        public void SignOut()
        {
            // To sign out the user, you should issue an OpenIDConnect sign out request.
            if (Request.IsAuthenticated)
            {
                IEnumerable<AuthenticationDescription> authTypes = HttpContext.GetOwinContext().Authentication.GetAuthenticationTypes();
                HttpContext.GetOwinContext().Authentication.SignOut(authTypes.Select(t => t.AuthenticationType).ToArray());
                Request.GetOwinContext().Authentication.GetAuthenticationTypes();
            }
        }


其他人遇到此问题与边缘? 

Anyone else run into this issue with Edge? 

推荐答案

您可以尝试将用户重定向到end_session端点:

You can try redirecting the user to the end_session endpoint:

GET https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/oauth2/v2.0/logout?
p=b2c_1_sign_in
&post_logout_redirect_uri=https%3A%2F%2Faadb2cplayground.azurewebsites.net%2F

我正在将您的问题上报给产品团队因为我已经看到很多关于这个确切问题的报告,并想确认它是否是一个错误。我会在收到回复时回复。 

I am escalating your question to the product team because I have seen many reports of this exact issue and want to confirm whether it's a bug. I will reply when I have a response. 


这篇关于B2C:无法从Edge注销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆