Code Monkey home page Code Monkey logo

Comments (6)

blowdart avatar blowdart commented on July 17, 2024

The purpose of ASP.NET identity was to be a starting point, changing implementations wasn't even on the board, especially as there only was one implementation to begin with. ApplicationUser was a class in the templates folks could edit to their hearts content, laying an interface on top of that, when the only really commonality would be an id (some people don't use emails) was adding complexity for no real gain.

from identity.

yetanotherchris avatar yetanotherchris commented on July 17, 2024

@blowdart As the library deals with TUsers I'd say you can be fairly confident they'll have a first and last name (culture dependent), an email, a username, id, and then other attributes.

The contract of the UserManager implies this by the methods, such as the find ones.

But is the advice therefore to use EF with the library? Is that the assumed usage?

from identity.

blowdart avatar blowdart commented on July 17, 2024

Believe it or not email address isn't a requirement, even though we assume it. We've had issues about everything keying off email address when some users want phone number as the unique identifier instead (mainly from China).

We assume EF for our stores, those not wanting to use EF we advise to implement the store interfaces.

from identity.

HaoK avatar HaoK commented on July 17, 2024

Just to clarify things, we did do some work in 2.0 to enable non EF based stores to use our POCOs.

We moved the pocos into a standalone Stores package which also has some base implementations that are not EF specific but tied to our POCO classes:
https://github.com/aspnet/Identity/tree/master/src/Stores

Our EF based stores derive from the store base classes and implement the abstract methods using EF. So there's something in between implementing the interfaces yourself, and always using EF as of 2.0.

Identity pre core had a IUser interface and one of the big changes moving to core was to eliminate that interface to allow identity to work with arbitrary POCO user types.

from identity.

yetanotherchris avatar yetanotherchris commented on July 17, 2024

@HaoK and @blowdart I'm writing a user and role manager for Roadkill but wanted to make it more generic - so my intention is write a general user manager as a Razor class library.

Without knowing about a basic TUser this isn't really feasible is it? Should I abandon the hope of making it generic and instead focus on a specialised user and role object?

from identity.

blowdart avatar blowdart commented on July 17, 2024

Honestly I'd abandon all hope here, it's one of the reasons we don't write a user manager, as soon as people customise it's an exercise in frustration

from identity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.