Closed paulallington closed 7 years ago
@paulallington it's not e-mail, it's the username: https://github.com/tugberkugurlu/AspNetCore.Identity.MongoDB/blob/44870eac70224f58147a74c41e99c4f1f7e01ef9/src/AspNetCore.Identity.MongoDB/MongoIdentityUser.cs#L36
@paulallington and changing the username is not supported: https://github.com/tugberkugurlu/AspNetCore.Identity.MongoDB/blob/44870eac70224f58147a74c41e99c4f1f7e01ef9/src/AspNetCore.Identity.MongoDB/MongoUserStore.cs#L181
However, I do think this is harsh and I probably carried this over from the RavenDB implementation. As MongoDB supports unique indexes, I do think that Id should be something uniquely generated (ObjectId
) rather than the username.
My apologies - username (they're just emails in my app). I didn't mean to come across harsh, I didn't say it was wrong or a bug, just some reasons for why it's potentially problematic.
@paulallington no, you are right. I didn't see it that way. This should change, I have put this among the issues which should be fixed. Thanks for the feedback and keep them coming 👍
@paulallington ow, sorry! I know what you mean now 😄 I meant the behaviour of the library is harsh, not you 😄 apologies, sorry again.
Hi guys, I do agree with @paulallington. and ObjectId
(as a string) is good option.
fixed by #32.
The ID property of a user is being set to the users email address. This is problematic for a few reasons.
Passing an email around as an ID is sometimes challenging. When passed in a url it is a users email address which may create data protection issues.
While I get it's potentially useful, as soon as a user changes their email address it's a PITA.