aspnet-identity-mongo icon indicating copy to clipboard operation
aspnet-identity-mongo copied to clipboard

Any sample of core 2.0 implementation?

Open Mech0z opened this issue 8 years ago • 19 comments

Can see the sample linked is more than 1 year old, do you have an updated version based on the new code?

Mech0z avatar Oct 23 '17 19:10 Mech0z

I have the same problem when create a default aspnet core 2 project on VS 2017. By default the project uses Microsoft.AspNetCore.All and the Microsoft.AspNetCore.Identity conflict with Microsoft.AspNetCore.Identity.MongoDB At aspnet core 1, does not have this problema.

Error Message: Error CS7069 Reference to type 'IdentityBuilder' claims it is defined in 'Microsoft.AspNetCore.Identity', but it could not be found

alextochetto avatar Nov 18 '17 12:11 alextochetto

I migrate the project to aspnetcore 2, using framework 4.6.1 and netstandard2.0 https://github.com/alextochetto/aspnetcore-identity-mongodb

alextochetto avatar Nov 18 '17 16:11 alextochetto

@alextochetto Have how do you resolve the stated Issue, I have been battling with it for quite a while now, but have not been able to resolve it

huzaynbolt avatar Dec 12 '17 10:12 huzaynbolt

Hi @huzaynbolt I migrate the project to aspnetcore 2, using framework 4.6.1 and netstandard2.0 https://github.com/alextochetto/aspnetcore-identity-mongodb try this one at http://alextochetto.com/aspnet-core-2-autenticacao-de-usuario-no-mongodb/ there is an examplo of implementation, it´s in portuguese, but!! regards

alextochetto avatar Dec 12 '17 10:12 alextochetto

I tried it but am getting this error Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]

huzaynbolt avatar Dec 12 '17 12:12 huzaynbolt

@huzaynbolt you need to download this package https://github.com/alextochetto/aspnetcore-identity-mongodb and add as a reference in the project.

alextochetto avatar Dec 12 '17 13:12 alextochetto

@alextochetto could you or @g0t4 host the updated package for dotnet core 2.0 on Nuget? It'll be really helpful.

mykeels avatar Jan 01 '18 06:01 mykeels

Hi @mykeels sorry for my late, I was travelling! I migrate the project to aspnetcore 2, using framework 4.6.1 and netstandard2.0 https://github.com/alextochetto/aspnetcore-identity-mongodb try this one at http://alextochetto.com/aspnet-core-2-autenticacao-de-usuario-no-mongodb/ there is an examplo of implementation, it´s in portuguese, but!! you need to download this package https://github.com/alextochetto/aspnetcore-identity-mongodb and add as a reference in the project because I don´t have permittion to publish at NuGet because the package has "Microsoft" in it´s name.

alextochetto avatar Jan 02 '18 12:01 alextochetto

I have the same issue Error Message: Error CS7069 Reference to type 'IdentityBuilder' claims it is defined in 'Microsoft.AspNetCore.Identity', but it could not be found

GODBS avatar Jan 20 '18 16:01 GODBS

@GODBS I migrate the project to aspnetcore 2, using framework 4.6.1 and netstandard2.0 https://github.com/alextochetto/aspnetcore-identity-mongodb try this one at http://alextochetto.com/aspnet-core-2-autenticacao-de-usuario-no-mongodb/ there is an examplo of implementation, it´s in portuguese, but!! you need to download this package https://github.com/alextochetto/aspnetcore-identity-mongodb and add as a reference in the project because I don´t have permittion to publish at NuGet because the package has "Microsoft" in it´s name.

alextochetto avatar Jan 22 '18 11:01 alextochetto

@alextochetto Tried on mac, but no success. I read ur blog can you elaborate more what needs to be done? I have same issue.

rhlrajput avatar Feb 04 '18 03:02 rhlrajput

Hi @rhlrajput I'll try on mac

alextochetto avatar Feb 08 '18 16:02 alextochetto

@rhlrajput I update the solution, and now it's working on mac too. screen shot 2018-02-08 at 17 00 25

alextochetto avatar Feb 08 '18 19:02 alextochetto

Hi guys, after struggling to make it work core 2, i ended to write from scratch a new version for that framework. I would like to know what you thing about it

https://github.com/matteofabbri/Microsoft.AspNetCore.Identity.Mongo

matteofabbri avatar Feb 19 '18 13:02 matteofabbri

Hi @matteofabbri I already did it, look at: https://github.com/alextochetto/aspnetcore-identity-mongodb

alextochetto avatar Feb 20 '18 01:02 alextochetto

@alextochetto i checked it out and it looks great, it includes a lot of stuff that i missed in my implementation but is really buggy, it drove me crazy to use it in my website. Some stuff that i noticed: claims are apparently ignored, maybe i'm doing something wrong i don't know, role name and normalized name are confused.

Example:

  • Assign the role "blog" to a user
  • [Authorize(Roles = "blog")] doesn't work
  • [Authorize(Roles = "BLOG")] works

I'm gonna try to find the time to investigate and fix those problem

matteofabbri avatar Mar 26 '18 11:03 matteofabbri

@alextochetto The solution worked like magic. Thanks

habyphael avatar Apr 06 '18 08:04 habyphael

@matteofabbri thank you aswell. Your implementation worked out in the end for me.

Tagman avatar May 12 '18 19:05 Tagman

@alextochetto The solution worked for me. Thanks a lot.

david-ae avatar Apr 29 '19 18:04 david-ae