Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change in SignInManager constructor (new parameter) #14828

Closed
BrennanConroy opened this issue Sep 30, 2019 · 1 comment · Fixed by #15044
Closed

Breaking change in SignInManager constructor (new parameter) #14828

BrennanConroy opened this issue Sep 30, 2019 · 1 comment · Fixed by #15044
Assignees
Labels
breaking-change Indicates a .NET Core breaking change

Comments

@BrennanConroy
Copy link
Member

Breaking change in SignInManager constructor (new parameter)

As part of adding support for new email/confirmation flows in Identity(dotnet/aspnetcore#8356), we added a new IUserConfirmation<TUser> argument to the constructor of SignInManager

Version introduced

3.0

Old behavior

SignInManager didn't require IUserConfirmation when constructing.

New behavior

SignInManager requires an IUserConfirmation.

Reason for change

Adding support for new email/confirmation flows

Recommended action

If manually constructing a SignInManager pass in an implementation of IUserConfirmation or grab one from DI to pass in.

Category

ASP.NET Core

Affected APIs

SignInManager.ctor


Issue metadata

  • Issue type: breaking-change
@kvbutler
Copy link

Just wanted to drop comment in here for others, as this was a little confusing for me.

The Microsoft.NET.Sdk.Web SDK has AspNetCore.Identity package included now, but Nuget only has the package up to version 2.2. Visual Studio tries to automatically install that version (2.2) from Nuget if your library project targets the regular SDK (Microsoft.NET.Sdk). This has incompatibilities if you are then referencing that library project from for example a WebApi project.

The solution is to remove all Nuget dependencies in your library projects, open up the .csproj file, and change the SDK

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <OutputType>Library</OutputType>
  </PropertyGroup>
  <!-- other configs -->
</Project>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates a .NET Core breaking change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants