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:
Shaun Walker
2019-08-02 15:51:47 -04:00
parent 9fbc71b531
commit b9c007998e
23 changed files with 231 additions and 173 deletions

View File

@ -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);
}
}
}