Auth added to blazor

This commit is contained in:
2021-10-13 20:39:11 -04:00
parent 2552ad4d87
commit cccd609233
9 changed files with 153 additions and 16 deletions

View File

@@ -0,0 +1,16 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Web.Pages
{
public class Logout : PageModel
{
public async Task<IActionResult> OnGet()
{
await HttpContext.SignOutAsync();
return Redirect("/");
}
}
}