When talking about user experience you always have to consider who this user is. According to each type can be a different response. In general it is said that it is not possible to answer this without conducting an experiment and careful evaluation to decide what is most appropriate.
If you really want a generalized form that may not be the best for your typical and most important user, and you need a more appropriate experience, then I would say allowing the two forms looks better. Actually, I keep asking myself why I would do it differently. I see only advantages in this, except that someone can get in the way of having options, especially if the details of the implementation allow it.
But it’s not the end of the world today to have one just because you almost always access it using auto-fill and you don’t have to remember or have to put the data there. Of course, not everyone uses this facility. Don’t forget to have a secure way to regain access for one of these two. In some cases it may be interesting only to accept email in recovery to avoid disturbing users when someone tries to recover with a similar name user.
Again, what will give real good user experience is not this decision but all the details of how it will be done.
Some consideration that seems silly but I think important: "both" implies that the two will be used, is a And, And that doesn’t even think about it, but it was then put "one or the other" which is the opposite of both, so ok. Such care is important especially when speaking of UX. The other answer states that it should be "a and the other, "which I think was only in the way, why would I do this? It is a complication to require both for almost zero gain (it has a slight security advantage but almost irrelevant). It may be that it was only said by carelessness since then she says the opposite.
This has nothing to do with accessibility, it has only to do with usability, they are different concepts.
Yep. Actually, the use of "both" made the question a bit confusing. Anyway, thanks for the answer. =)
– Luiz Felipe