I am trying to implement the registration of a username in Firebase since it only gives me methods that are like the createUserWithEmailAndPassword(), but you can n
You cannot store custom data within a firebase user per se, according to firebase documentation
You cannot add other properties to the Firebase User object directly; instead, you can store the additional properties in your Firebase Realtime Database.
Since each registered user has a unique id that you can access with
FirebaseAuth.getInstance().getCurrentUser().getUid()
once the user logs in, you can create a table in the realtime database that stores data of each user using your User class. Then you can query the database for the logged in user using the snippet above for the Uid.
More info here: https://firebase.google.com/docs/auth/users