Browse Source

Merge pull request #2691 from gterdem/pr/rm_logout

Removed MVC LogoutController.
pull/2693/head
Halil İbrahim Kalkan 6 years ago
committed by GitHub
parent
commit
d6b6099e1d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 33
      modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs

33
modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs

@ -1,33 +0,0 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace Volo.Abp.Account.Web.Areas.Account.Controllers
{
[Area("Account")]
public class LogoutController : AbpController
{
private readonly SignInManager<IdentityUser> _signInManager;
public LogoutController(SignInManager<IdentityUser> signInManager)
{
_signInManager = signInManager;
}
//todo@alper: this method can be moved to AccountController like "account/logout"
//No longer needed. Already implemented Pages/Account/Logout
public async Task<IActionResult> Index(string returnUrl = null)
{
await _signInManager.SignOutAsync().ConfigureAwait(false);
if (returnUrl != null)
{
return LocalRedirect(returnUrl);
}
return RedirectToPage("/Account/Login");
}
}
}
Loading…
Cancel
Save