Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Core 2.0 missing Scaffolding items

$
0
0

I created a Core 2.0 project with User Base Authentication, but upon looking at the default AccountController only the Logout() action method was generated. 

Where are the other scaffold items like Register(), ForgotPassword(), ExternalLogin(), etc...

However, I can register users just fine.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Threading.Tasks;

using Microsoft.AspNetCore.Identity;

using Microsoft.AspNetCore.Mvc;

using Microsoft.Extensions.Logging;

using Core2.Data;



namespace Core2.Controllers

{

    [Route("[controller]/[action]")]

    public class AccountController : Controller

    {

        private readonly SignInManager<ApplicationUser> _signInManager;

        private readonly ILogger _logger;



        public AccountController(SignInManager<ApplicationUser> signInManager, ILogger<AccountController> logger)

        {

            _signInManager = signInManager;

            _logger = logger;

        }



        [HttpPost]

        [ValidateAntiForgeryToken]

        public async Task<IActionResult> Logout()

        {

            await _signInManager.SignOutAsync();

            _logger.LogInformation("User logged out.");

            return RedirectToPage("/Index");

        }

    }

}

Thanks,


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>