tout du bon:
- mobile app declaration (WIP) - login/logout depuis la même resource, sans bug (note: appliquer AllowAnonymous à la classe => methodes d'attribut Authorize non redirigées) - les médias des posts
This commit is contained in:
parent
9d078e4e8e
commit
6e301e52d8
20 changed files with 320 additions and 187 deletions
|
|
@ -18,8 +18,7 @@ using Yavsc.ViewModels.Account;
|
|||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[AllowAnonymous]
|
||||
[ServiceFilter(typeof(LanguageActionFilter))]
|
||||
[ServiceFilter(typeof(LanguageActionFilter)),AllowAnonymous]
|
||||
public class AccountController : Controller
|
||||
{
|
||||
private readonly UserManager<ApplicationUser> _userManager;
|
||||
|
|
@ -138,6 +137,7 @@ namespace Yavsc.Controllers
|
|||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> LogOff(string returnUrl = null)
|
||||
{
|
||||
await HttpContext.Authentication.SignOutAsync("ServerCookie");
|
||||
await _signInManager.SignOutAsync();
|
||||
_logger.LogInformation(4, "User logged out.");
|
||||
if (returnUrl==null) return RedirectToAction(nameof(HomeController.Index), "Home");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue