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

Any sample of core 2.0 implementation? #38

Open
Mech0z opened this issue Oct 23, 2017 · 19 comments
Open

Any sample of core 2.0 implementation? #38

Mech0z opened this issue Oct 23, 2017 · 19 comments

Comments

@Mech0z
Copy link

Mech0z commented Oct 23, 2017

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

@alextochetto
Copy link

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
Copy link

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

@huzaynbolt
Copy link

@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

@alextochetto
Copy link

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

@huzaynbolt
Copy link

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

@alextochetto
Copy link

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

@mykeels
Copy link

mykeels commented Jan 1, 2018

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

@alextochetto
Copy link

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.

@GODBS
Copy link

GODBS commented Jan 20, 2018

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

@alextochetto
Copy link

@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.

@rhlrajput
Copy link

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

@alextochetto
Copy link

Hi @rhlrajput I'll try on mac

@alextochetto
Copy link

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

@matteofabbri
Copy link

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

@alextochetto
Copy link

@matteofabbri
Copy link

@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

@habyphael
Copy link

@alextochetto The solution worked like magic. Thanks

@Tagman
Copy link

Tagman commented May 12, 2018

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

@david-ae
Copy link

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

Repository owner deleted a comment from neojp Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants