PiranhaCMS / piranha.core

Piranha CMS is the friendly editor-focused CMS for .NET that can be used both as an integrated CMS or as a headless API.

Home Page:http://piranhacms.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UseIdentityWithSeed does not add the user sysadmin.

HusseinKhodadadi opened this issue · comments

Create a piranha mvc project with a SQL Server database using Visual Studio Piranha template. Change the login page path from the default path to a custom path. On the first login, the user sysadmin is not created, and the users table is empty.

Program.cs :
image
image
LoginController :
image

I think I understand where the problem is. The default password created for the admin user is "password". When executing the method:
var createResult = await _userManager.CreateAsync(user, "password");
the creation of the new user is rejected by SQL Server due to the simplicity of the password.

Hi there! Yes the plan is to replace this with an extension method that prompts the user with a view the first time it’s started where you setup your own username/password. The existing method is basically there to get the templates up and running without having to do any code modifications.