Comments (6)
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.
@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.
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.
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.
@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.
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)
- Block enabling 2fa if cookie policy not accepted HOT 2
- Test failure: CheckPasswordSignInReturnsLockedOutWhenLockedOut HOT 16
- Test failure: PasswordSignInFailsWithWrongPassword HOT 7
- Question: can return an IIdentityBuilder interface instead of IdentityBuilder class? HOT 2
- Re-enable Identity tests on net461 HOT 1
- [Question] Passwords should not be of type String ? HOT 3
- Fix integrity tags on Identity UI V3 HOT 1
- AD directory user-groups; can IdentityRole be subclassed to implement Role-Groups or User-Groups HOT 6
- Survey: Your experience using Identity UI and customization HOT 1
- Spelling error DeletePersonalData.cshtml.cs HOT 2
- BypassTowFactor in SignInManager:ExternalLoginSignInAsync should default to False HOT 25
- Login doesn't show registered social logins after error HOT 1
- Remember me isPersistent understanding
- Replace a Role Validator HOT 2
- No sign-out authentication handler is registered for the scheme 'Identity.External' HOT 4
- Random Authentication Sign Outs in ASP.NET Core 2.1 HOT 4
- Q: moving of source HOT 4
- No way to Add a password after creating user, except through Reset
- The non-scaffolded razor page "Register" does not recognise Password.RequiredLength. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identity.