I think I've found a bug in the interaction betwee...
# support-questions-legacy
g
I think I've found a bug in the interaction between Next.js's
basePath
and SuperTokens' `apiBasePath`: If you set a
basePath
, the
req.url
which the app sees doesn't include the prefix. As such, your prefix check fails to match (https://github.com/supertokens/supertokens-node/blob/a7dcb2b4123c512de63d5d5206da315a679759be/lib/ts/supertokens.ts#L344) and the middleware is not employed. At the same time, it seems I need to include Next.js's
basePath
as part of the
apiBasePath
otherwise the generated URLs are missing it and Next can't route the request properly.
Just found your
apiGatewayPath
That works 🙌
I can work around this, but
websiteGatewayPath
would have been handy here too
4 Views