-
-
Notifications
You must be signed in to change notification settings - Fork 766
Login by Username or Email #1108
Comments
Sure - your user service can interpret the username field in any way you like. |
Yes that makes sense, thanks for clarification. In case/sample of MembershipReboot sample would making this simple override in CustomUserAccountService be enough to enable combined login?
|
Yep - that's the point of that virtual. |
Also I think there's already an API on MR called AuthenticateWithUsernameOrEmail IIRC. |
I found the AuthenticateWithUsernameOrEmail and override works with that directly.
Note that if in config EmailIsUsername = true |
Do you mind opening an issue in the MR repo for that? If there's a bug, I'd like to fix it. Thx. |
It is only an issue if you try to make the override like this
combined with Config.EmailIsUsername = true; simply because AuthenticateWithUsernameOrEmail calls Authenticate internally causing the call loop. So I'm not sure if you want this filed as issue in MR. If you really want this override possible in MR simply replace this method definition:
with
Only bottom part is modified (ignoring EmailIsUsername and '@' check). All tests run green in MR with the change. |
@brock will open an issue in MR for that. |
Default setup supports login by Username. Is combined input (username or email) possible?
The text was updated successfully, but these errors were encountered: