Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 3.07 KB

File metadata and controls

43 lines (27 loc) · 3.07 KB

User ID Best Practices

Introduction

When integrating with our API, it is important to use unique user IDs to ensure the persistence of memory and relationships. This guide will walk you through the best practices for creating and using user IDs that are secure, unique, and not easily guessable.

THIS INFORMATION APPLIES TO BOTH PLAYER IDs AND USER IDs

Why Use Unique User IDs?

User IDs are used to represent the unique relationship and shared experiences between the User/Player and the character they're talking to. Using unique user IDs offers several benefits:

  1. Data Integrity: Unique user IDs prevent data conflicts and ensure the accuracy of relationships between entities in your application.
  2. Security: By avoiding easily guessable or duplicate user IDs, you reduce the risk of unauthorized access to user data.
  3. Scalability: Unique user IDs make it easier to scale your application by avoiding potential collisions and ensuring efficient data retrieval.

Best Practices for Creating Unique User IDs

Follow these best practices when generating user IDs for your application:

  1. Uniqueness: Ensure that each user ID is unique within your system. Avoid reusing IDs or using identifiers that are commonly used or easily guessable, such as sequential numbers or names.
  2. Randomness: Generate user IDs using random algorithms or strong cryptographic functions. Randomness adds an extra layer of security and makes it harder for attackers to predict or manipulate user IDs.
  3. Length and Complexity: Consider using a combination of alphanumeric characters (lowercase and uppercase), numbers, and symbols to increase the complexity of the user IDs. This helps mitigate the risk of brute-force attacks or guessable patterns.
  4. Avoid Personally Identifiable Information (PII): Do not include any personally identifiable information, such as names, email addresses, or phone numbers, directly in the user IDs. This protects user privacy and helps maintain compliance with data protection regulations.
  5. Collision Detection: Implement a mechanism to detect and handle collisions in case two user IDs are generated identically. This could involve checking against existing user IDs in your system or using a unique identifier generation algorithm that guarantees uniqueness.

Examples of Unique User IDs

Here are some examples of unique user IDs that adhere to the best practices mentioned above:

  • yT7qD9wFg5Z2
  • rGhT6sKp2Jn4
  • xN3sW1oHtVd8

Remember, the examples provided are just for illustration purposes. It's essential to generate your unique user IDs based on your specific application's requirements and security considerations.

Summary

Using unique user IDs is crucial for maintaining data integrity, security, and scalability in your application. By following the best practices outlined in this guide, you can ensure that your user IDs are secure, not easily guessable, and unique within your system.

If you have any further questions or need assistance, please don't hesitate to reach out to our support team.

\