Вопрос

I'm trying to provide the user with the capability of "loging in" using either her/his username or her/his email. The thing is that afaik, I can have only one @UserPrincipal into my User class. Any idea of how to achieve this? Thanks in advance!

Это было полезно?

Решение

Define the Emailadress as unique in the User table.

When the user enters an emailaddress, lookup the Username from the table and use it to authenticate.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top