Seed users to Episerver’s ASP.NET Identity implementation
After installing Episerver’s ASP.NET Identity implementation, via EPiServer.Cms.UI.AspNetIdentity and Cookie Authentication, you’ll have to seed at least one user to take advantage of Episerver’s administration or authoring capabilities.
Seeding users, in the Alloy example site, are managed by a FilterAttribute, which ensures requests get’s routed by a registration controller for the initial user setup. Instead of relying on that entire mechanism, you can just as well seed the initial accounts via a MigrationStep.
Above code is an example of how you can seed an “initialadministrator” account with WebAdmins and WebEditors privileges. Be aware that these groups already has to exist for the example to work – but you can easily add these dynamically, as part of your seed, through the use of IRoleStore