diff --git a/README.md b/README.md index d4cf780..e25dd1d 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Here is an example: } } ``` -The Id field is automatically set at instanciation, this also applies to users inheriting from MongoIdentityUser, where a random integer is assigned to the Id. It is however not advised to rely on such random mechanism to set the primary key of your document. Using documents inheriting from `MongoIdentityRole` is recommended. +The `Id` field is automatically set at instanciation, this also applies to users inheriting from `MongoIdentityUser`, where a random integer is assigned to the `Id`. It is however not advised to rely on such random mechanism to set the primary key of your document. Using documents inheriting from `MongoIdentityRole` is recommended. The configuration is done by populating a `MongoDbIdentityConfiguration` object, which can have an `IdentityOptionsAction` property set to an action you want to perform against the `IdentityOptions` (`Action`). @@ -60,6 +60,7 @@ The MongoDb connection is managed using the [mongodb-generic-repository](https:/ // add a global config object services.AddSingleton(Configuration); + // get the MongoDb settings from the Configuration object. var settings = Configuration.GetSection(nameof(MongoDbSettings)).Get(); var mongoDbIdentityConfiguration = new MongoDbIdentityConfiguration { @@ -76,7 +77,6 @@ The MongoDb connection is managed using the [mongodb-generic-repository](https:/ options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(30); options.Lockout.MaxFailedAccessAttempts = 10; - // ApplicationUser settings options.User.RequireUniqueEmail = true; options.User.AllowedUserNameCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@.-_";