Hey <@!457661396717666304> , `apiBasePath` value s...
# support-questions-legacy
k
Hey @User ,
apiBasePath
value should be
/auth
. I assume you have set
dev
as your staging environment. When the request is passed to the Lambda endpoint,
/dev
will not be part of the request path. It is more like an api proxy path. In supertokens config, you need to set the
apiWebProxyPath
to
/dev
. The 404 error you were getting earlier was because when the request reaches your lambda function, the route would be
/auth/signup
or
/auth/signin
. But the supertokens middleware would handle requests with path
/dev/auth/...
And if express router can't find any handler function that can handle the API route, it would result in a 404 error. Your final config would look like:
Copy code
supertokens.init({
  supertokens: {
    connectionURI: "https://blah-blah.aws.supertokens.io:3568",
    apiKey: "blah",
  },
  appInfo: {
    appName: "WorkoutApp",
    apiDomain: "https://blah.amazonaws.com",
    apiBasePath: "/auth",
    websiteDomain: "http://localhost:3000",
    websiteBasePath: "/dev/auth"
  },
  recipeList: [EmailPassword.init(), Session.init()],
  isInServerlessEnv: true,
  apiWebProxyPath: "/dev"
})
2 Views