Comments (4)
IIRC the tradeoff was between being surprised by hard to track down runtime errors ... or being annoyed when people look at uppercase.
Regardless, annoyance is perception, one that is within your ability to control. This is a wonderful opportunity to see how powerful it can be to prove yourself wrong (prove that you don't have to be annoyed) which is a powerful tool to keep in your toolbelt.
I have a bit more about how to change annoyance into at least disinteresting, perhaps even liking: http://www.weshigbee.com/being-happy-without-compromising-when-you-dont-get-your-way/
At first, when I saw what the new API was doing with normalization, I didn't like it either. You can see this in my comments in the code. But, I reminded myself that it works still, so I actually don't mind.
from aspnet-identity-mongo.
What I mean is, that it is not consistent. E.g. you introduce a role with AddRoleAsync((new IdentityRole("admin")) and then you cannot use this role name directly. Of course it is best practice to use case invariant string comparisons, but this also a "problem" for debugging or for the UI's in my opionion.. And why is there a normalized name and a normal name?
from aspnet-identity-mongo.
The normalized name/email stuff was added in the last update to the framework, I haven't been able to find a reason why.
If you want the names unaltered you can query the underlying mongo collection. I designed that GetRolesAsync to plug back into the existing methods which work with a normalized form. I never saw much value in that GetRolesAsync method because it's just firing off a simple query.
from aspnet-identity-mongo.
I just uppercased all role names :D
from aspnet-identity-mongo.
Related Issues (20)
- Add logging for debugging purposes
- Convert UserLoginInfo to own type - no surprise changes from Core library - like displayName was added in v3
- IRoleClaimStore<TRole> HOT 1
- Need to target both ASP.NET Core on the .NET Framework and .NET Core - all else is irrelevant as this is just an ASP.NET Core Identity model
- Normalization of UserName, Email and Role's Name with Core Identity
- Create extension method AddMongoStore to simplify injecting IUserStore and IRoleStore
- Publish new package - Microsoft.AspNetCore.Identity.MongoDB
- Create a sample for Identity 3 with ASP.NET Core
- AddIdentityWithMongoStoresUsingCustomTypes with IdentityOptions HOT 1
- Authorize(Roles="Admin") -attribute not working HOT 4
- Timeout at MongoDb connection HOT 2
- HasPassword returns always false HOT 3
- Changes with Auth 2.0 & netcoreapp2.0 HOT 5
- please upgrade this library to .Net core 2.0? HOT 9
- Any sample of core 2.0 implementation? HOT 19
- Microsoft.AspNetCore.Identity.MongoDB HOT 1
- Using Mongo identity with ASP Core 2.1 HOT 6
- '45db8e65-d2de-44bc-b512-12750256dcb5' is not a valid 24 digit hex string. HOT 1
- Reference to type 'IdentityBuilder' claims it is defined in 'Microsoft.AspNetCore.Identity', but it could not be found 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 aspnet-identity-mongo.