I'm using CookieAuthenticationOptions to configure authentication in my .NET Core application, but my login page is on a different domain. However, the LoginPath property only allows an internal path, not a full URI. So the following code:
var cookieOptions = new CookieAuthenticationOptions()
{
AuthenticationScheme = "Cookies",
LoginPath = new PathString("https://externaldomain.com/login"),
CookieName = string.Format("myCookie"),
};
app.UseCookieAuthentication(cookieOptions);
... is invalid. This should be reasonably simple, or am I missing something here? I'd hate to handle this internally in my application and do the actual redirection myself. That would be kinda lame.