Firebase supports many types of authentication methods. The basic method uses client e-mail and password, which should be unique per client.
User names should be unrelated and entirely up to you how you want to handle duplicates, weather you want to allow them or not.
As far as Firebase is concerned, if you're using your own username system to authenticate, you should use the token method described here https://firebase.google.com/docs/auth/web/custom-auth.
Once you have a unique authenticated client, a username can be the same as someone elses, as it is simply data associated with that particular client.