You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BWPM/APP20210603/Helper/Account/MyCookieAuthenticationEvent...

21 lines
622 B

using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace APP.Helper
{
public class MyCookieAuthenticationEvents : CookieAuthenticationEvents
{
public override Task RedirectToLogin(RedirectContext<CookieAuthenticationOptions> context)
{
//context.RedirectUri = "/login?returnUrl=" + context.HttpContext.Request.Path.Value;
context.RedirectUri = "/";
return base.RedirectToLogin(context);
}
}
}