Having two identies to login a user

Hi there :slight_smile:
We would like our users to be able to login using either their email-address or their username and of course their password.
Is this possible?
(I hope this is the right category for this question :slight_smile: )

Hi Sven,

Backendless allows only one identity property, so I think it’s impossible, unfortunately.

Actually, there is a way you could emulate this. Suppose you have “email” as an identity and “login” as unique, and the user tries to login with “login” and “password”. Then you need to retrieve the user object with Backendless.Data, get its email and run Backendless.UserService.login() using this email and the user’s password. You can implement this logic either in your client app or as a beforeLogin event handler from Business Logic.