| | 1 | | @page |
| | 2 | | @using Microsoft.AspNetCore.Identity |
| | 3 | | @attribute [IgnoreAntiforgeryToken] |
| | 4 | | @inject SignInManager<MUNity.Database.Models.User.MunityUser> SignInManager |
| | 5 | | @functions { |
| | 6 | | public async Task<IActionResult> OnPost() |
| 0 | 7 | | { |
| 0 | 8 | | if (SignInManager.IsSignedIn(User)) |
| 0 | 9 | | { |
| 0 | 10 | | await SignInManager.SignOutAsync(); |
| 0 | 11 | | } |
| | 12 | |
|
| 0 | 13 | | return Redirect("~/"); |
| 0 | 14 | | } |
| | 15 | |
|
| | 16 | | public async Task<IActionResult> OnGet() |
| 0 | 17 | | { |
| 0 | 18 | | if (SignInManager.IsSignedIn(User)) |
| 0 | 19 | | { |
| 0 | 20 | | await SignInManager.SignOutAsync(); |
| 0 | 21 | | } |
| | 22 | |
|
| 0 | 23 | | return Redirect("~/"); |
| 0 | 24 | | } |
| | 25 | | } |
| | 26 | |
|