It's kind of confusing, but the problem (as of writing this) is that the AddIdentity
extension method used to register the identity services isn't included in the Microsoft.Extensions.DependencyInjection
package (even though the API docs show it is oddly enough). It is part of the Microsoft.AspNetCore.Identity
package. Add that package to your project and once you import it via a using
statement then the method will be available to use to register the desired services.