SuperTokens

No results

Help CenterTroubleshooting and SupportDecoding SuperTokens Error Messages

Decoding SuperTokens Error Messages

Last updated March 1, 2024

Introduction

SuperTokens plays a crucial role in securing applications through robust authentication and session management. However, during development or deployment, you might encounter various error messages from SuperTokens. Understanding these error messages is key to resolving issues quickly and efficiently. This article aims to demystify common SuperTokens error messages, providing clear guidance on how to address them.

Prerequisites

Before diving into specific error messages, ensure you have:

  • Access to your application's logs where SuperTokens error messages are recorded.
  • A basic understanding of your application's architecture and how SuperTokens is integrated.
  • Familiarity with the SuperTokens documentation for reference.

Common SuperTokens Error Messages and Solutions

  1. Error: "INVALID_API_KEY_ID"
  • Symptom: This error occurs when the API key used in a request to the SuperTokens service is incorrect or missing.
  • Resolution Steps:
  1. Verify that the API key in your application's configuration matches the one provided by SuperTokens.
  2. Ensure that the API key is correctly included in all requests to the SuperTokens service.
  1. Error: "UNSUPPORTED_VERSION"
  • Symptom: This error message indicates that the version of the SuperTokens SDK you are using is not compatible with the SuperTokens Core service.
  • Resolution Steps:
  1. Check the version of your SuperTokens Core service and compare it with the SDK version compatibility chart in the SuperTokens documentation.
  2. Upgrade your SDK or the SuperTokens Core service to ensure compatibility.
  1. Error: "TOKEN_THEFT_DETECTED"
  • Symptom: This critical error is triggered when a session token theft is detected, indicating a possible security breach.
  • Resolution Steps:
  1. Invalidate the affected user's session immediately to mitigate any potential security risk.
  2. Investigate the source of the token theft, examining logs and monitoring for unusual activity.
  3. Implement additional security measures as necessary, such as HTTPS enforcement, to prevent future incidents.
  1. Error: "EMAIL_ALREADY_EXISTS_ERROR"
  • Symptom: This error occurs during the user registration process when an attempt is made to register with an email address that already exists in the system.
  • Resolution Steps:
  1. Prompt the user to log in instead of registering if they already have an account.
  2. If implementing a custom registration flow, add logic to check for existing users before attempting to create a new one.
  1. Error: "SESSION_EXPIRED"
  • Symptom: This error message is encountered when a user attempts to perform an action with an expired session token.
  • Resolution Steps:
  1. Prompt the user to re-authenticate to obtain a new session token.
  2. Review the session expiration settings in your SuperTokens configuration to ensure they meet your application's needs.
  1. Error: "DATABASE_CONNECTION_ERROR"
  • Symptom: Indicates that SuperTokens Core cannot establish a connection to the database.
  • Resolution Steps:
  1. Verify the database connection parameters in the SuperTokens configuration.
  2. Ensure the database service is running and accessible from the SuperTokens Core service.
  3. Check the database server logs for more detailed error messages that can help diagnose the connection issue.

Conclusion

Encountering error messages from SuperTokens can be a daunting aspect of integrating robust authentication into your application. However, by understanding what these errors signify and following structured resolution steps, you can quickly address issues, enhancing both the security and reliability of your application. Always refer to the latest SuperTokens documentation for comprehensive error descriptions and troubleshooting tips.

Was this article helpful?