I have a signup activity where users sign into firebase. But I want each user to have a different username of the format username#4-digit-code
. How can I achieve this with Firestore as i found out with this post that we can't use queries in our transactions?
What would be the best approach for it to prevent two users from having the same userid?