MongoDB.Driver.Linq.ExpressionNotSupportedException: ' Expression not supported: i.ToClaim()
I have implemented identity in ASP.NET Core, with features like registration and login working properly, including returning a JWT. Now, I want to migrate the system to MongoDB with using MongoDB.EntityFrameworkCore package. During testing, I can successfully register a new user, and the user appears in the collection. However, when I attempt to log in, I encounter the following exception.
All I did
to
in the AppDbContext
What can cause this? The registration works as expected but when login throws this.
5 Replies
what does the CustomMapIdentityApi look like?
It is actually an extension for IEndpointRouteBuilder.
seems to be related to https://github.com/dotnet/aspnetcore/commit/a86a811f7b55c03f815b7ac37413a179e6459ba7#diff-36dc18631abb19922d005f7596d86abc3194567451120f5dd2d80ef58f0a5a77L315
GitHub
Cleanup in Identity tests · dotnet/aspnetcore@a86a811
Fixes #10671 by using updated EF API
Fixes #5812 so tests are re-enabled for PRs
Also part of #10668 since one of the changed EF queries is now working
Finally, I removed all remaining platform sk...
efcore got a fix to handle it, but same has not been done by the mongodb developers
Ohh thanks, I wouldn't find this for sure 😄 agree it must be that the reason.