-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Hello,
first things first : i've made a project with all the latest version of next and supertokens to test this, so you can consider the current version as the one having an issue π
When you set a basePath for nextJs everything get prefixed and it messes up with Supertokens' paths.
If you set up a simple project with the following parameters nothing works :
export const appInfo = {
appName: 'App',
websiteDomain: 'http://localhost:3000',
apiDomain: 'http://localhost:3000',
apiBasePath: '/prefix/auth',
websiteBasePath: "/prefix/auth",
};
next.config.ts :
const moduleExports = {
basePath: '/prefix'
}
When messing with the appInfo, either you get blocked by a path filter in the backend ether you get redirected to /prefix/prefix/auth
// if the prefix of the URL doesn't match the base path, we skip
if (!path.startsWith(this.appInfo.apiBasePath)) {
(0, logger_1.logDebugMessage)(
"middleware: Not handling because request path did not start with config path. Request path: " +
path.getAsStringDangerous()
);
return false;
}
I can't find a way to make it work
Metadata
Metadata
Assignees
Labels
No labels