Stefan
Stefan

Reputation: 585

Azure AD B2C domain cookie

I have a web app which runs under service.domain.de. For authentication in this app I use Azure AD B2C. In the azure security cookie is for the domain service.domain.de . What can I do to get the security cookie for the domain .domain.de? So with the domain .domain.de the cookie is for the domain.de and all subdomains. The service I wrote in ASP.Net and used Microsoft.Owin.Security library (OpenId).

Upvotes: 2

Views: 1113

Answers (1)

Saca
Saca

Reputation: 10656

When you add CookieAuthentication, you can control the domain via CookieAuthenticationOptions' CookieDomain like so:

app.UseCookieAuthentication(new CookieAuthenticationOptions {
  CookieDomain = "domain.de"
});

Upvotes: 1

Related Questions