Browse Source

Update Customize-SignIn-Manager.md

pull/3494/head
Halil İbrahim Kalkan 6 years ago
parent
commit
577396186b
  1. 9
      docs/en/How-To/Customize-SignIn-Manager.md

9
docs/en/How-To/Customize-SignIn-Manager.md

@ -82,12 +82,13 @@ To get your overridden method invoked and your customized SignIn Manager class t
Registering `CustomSignInManager` should be done with adding **AddSignInManager** extension method of the [IdentityBuilderExtensions](https://github.com/dotnet/aspnetcore/blob/master/src/Identity/Core/src/IdentityBuilderExtensions.cs) of the [IdentityBuilder](https://github.com/dotnet/aspnetcore/blob/master/src/Identity/Extensions.Core/src/IdentityBuilder.cs).
Inside your `.Web` project, locate the `ApplicationNameWebModule` and add the following under `ConfigureServices` method to replace the old `SignInManager` with your customized one.
Inside your `.Web` project, locate the `YourProjectNameWebModule` and add the following code under the `PreConfigureServices` method to replace the old `SignInManager` with your customized one:
````csharp
context.Services
.GetObject<IdentityBuilder>()
.AddSignInManager<CustomSignInManager>();
PreConfigure<IdentityBuilder>(identityBuilder =>
{
identityBuilder.AddSignInManager<CustomSignInManager>();
});
````
## The Source Code

Loading…
Cancel
Save