Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in SuperTokens Node SDK with apiBasePath in supertokens.init #959

Open
GSJ06 opened this issue Nov 14, 2024 · 0 comments
Open

Bug in SuperTokens Node SDK with apiBasePath in supertokens.init #959

GSJ06 opened this issue Nov 14, 2024 · 0 comments

Comments

@GSJ06
Copy link

GSJ06 commented Nov 14, 2024

Description

I encountered an issue with the SuperTokens Node SDK when setting up a custom apiBasePath in supertokens.init. When configuring apiBasePath to include /Dashboard, the User Management Dashboard's API endpoints fail to function if the paths contain a tenant name. Below are the configuration details and issue specifics.

Configuration Used

supertokens.init({
    appName: "Dashboard",
    apiDomain: "http://localhost:5000",
    websiteDomain: "http://localhost:3000",
    apiBasePath: "/Dashboard/auth",
    websiteBasePath: "/Dashboard/auth"
});

Setup Details

  • Frontend URL: http://localhost:3000/Dashboard
  • Expected User Management Dashboard URL: http://localhost:5000/Dashboard/auth/dashboard

Issue

After setting apiBasePath to /Dashboard/auth, the SuperTokens User Management Dashboard APIs, specifically those containing a tenant name in their paths, fail to work. The expected Dashboard URL (e.g., http://localhost:5000/Dashboard/auth/dashboard) does not function correctly under this setup.

Steps to Reproduce

  1. Set up supertokens.init as shown in the configuration above.
  2. Attempt to access the User Management Dashboard at the specified URL.
  3. Observe that any API call involving tenant-specific paths fails to respond correctly.

Expected Behavior

The User Management Dashboard APIs should work seamlessly regardless of custom apiBasePath configurations, including cases where /Dashboard is used in the path.

Actual Behavior

APIs with tenant paths in the User Management Dashboard do not function when apiBasePath is set with /Dashboard.

Supertokens Dashboard issue 2
Supertokens Dashboard issue

Thank you for looking into this issue. Let me know if you need further details or logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant