Improved page reload efficiency, refactored NavigateUrl and EditUrl helpers, added antiforgery token and returnurl to Logout scenario, fixed PageModule service call api url, modified rendering engine to allow for component differentiation
This commit is contained in:
@ -12,15 +12,19 @@ using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Pages
|
||||
{
|
||||
[IgnoreAntiforgeryToken(Order = 1001)]
|
||||
[AllowAnonymous]
|
||||
public class LogoutModel : PageModel
|
||||
{
|
||||
public async Task<IActionResult> OnPostAsync()
|
||||
public async Task<IActionResult> OnPostAsync(string returnurl)
|
||||
{
|
||||
await HttpContext.SignOutAsync(IdentityConstants.ApplicationScheme);
|
||||
|
||||
return LocalRedirect(Url.Content("~/"));
|
||||
string url = "~/";
|
||||
if (returnurl != "/")
|
||||
{
|
||||
url = Url.Content("~/" + returnurl);
|
||||
}
|
||||
return LocalRedirect(url);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user