[英]Azure B2C SSO with OWIN
we are trying to achieve the following scenario involving two applications: 我们正在尝试实现以下涉及两个应用程序的方案:
APP1 should now also be authenticated as it uses Azure B2C and SSO is configured in the policies. 由于APP1使用Azure B2C,并且在策略中配置了SSO,因此现在也应进行身份验证。 My issue is in step 4, APP1 won't recognize that the user already signed in against AB2C via APP2.
我的问题是在步骤4中,APP1无法识别该用户已经通过APP2针对AB2C登录。
var cookieAuthenticationOptions = new CookieAuthenticationOptions { CookieDomain = ".app.localhost", CookieName = "IAMAuthentication", ExpireTimeSpan = TimeSpan.FromMinutes(30), SlidingExpiration = true, CookieSecure = CookieSecureOption.SameAsRequest, LoginPath = new PathString("/login"), LogoutPath = new PathString("/logout"), Provider = new CookieAuthenticationProvider { OnApplyRedirect = ApplyCookieRedirect } }; var openIdAuthOptions = new OpenIdConnectAuthenticationOptions { RedirectUri = RedirectUri, ClientId = ClientId, Authority = string.Format(AadInstance, ApiTenant, SignInPolicy), TokenValidationParameters = new TokenValidationParameters { NameClaimType = "name", SaveSigninToken = true }, PostLogoutRedirectUri = RedirectUri }; app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); app.UseCookieAuthentication(cookieAuthenticationOptions); app.UseOpenIdConnectAuthentication(openIdAuthOptions); app.UseStageMarker(PipelineStage.Authenticate);
原来是租户中缺少的配置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.