Generating Unique, Random Usernames in Xano and Adalo: Practical Techniques and Collision Risks

In this meeting, State Changers discussed generating unique, random usernames for a user database on the platform Xano. The username creation would bypass giving the user an option to select a username, instead assigning them one automatically. This is considered a temporary solution for an early-phase application where the UX doesn't include a feature for users to choose their own usernames.

The main idea was to generate a username by combining unique elements of the user's profile – their full name, email prefix, or ID – along with a random number. The State Changers explained the process step-by-step on Xano, suggesting the use of alphanumeric characters from the user's full name and a random number as a username. One potential approach discussed was integrating the user's email address and a random number. This starts with filtering the username base by splitting the user's email address at the '@' sign, then taking the first part of this split email to use as the base, and adding a random number. The meeting also touched upon collision risks, highlighting the reduced likelihood of collision when combining two types of data entropy – the email prefix and the randomly generated number. It was also mentioned that this approach ensures more uniqueness than using standalone six-digit numbers, which could potentially collide as the user database grows. For the cases where email information isn't available, a fallback could be implemented to provide alternative username generation methods. Lastly, the UUID (Universally Unique Identifier) was introduced as an option for unique identifiers that needn't be human-readable. However, it was acknowledged that the UUID, being complex and long, is not ideal for occasions where human recall is required. The choice between user-friendly identifiers and machine-specific unique identifiers would depend on the needs of the application.

(Source: Office Hours 7/19/23 )

State Change Members Can View The Video Here

View This Video Now

Join State Change Risk-Free