rp
10/23/2021, 8:23 AMrp
10/23/2021, 8:24 AMrp
10/23/2021, 8:25 AMM̸̹̣i̼̗č̹̰o̧̲ͅ
10/23/2021, 8:25 AMrp
10/23/2021, 8:26 AMrp
10/23/2021, 8:27 AMuser
10/23/2021, 1:17 PM/dev
but since I have a custom domain name, the stage is already mapped to this custom domain name. so, I don't have the apiGatewayPath
property set up.rp
10/23/2021, 1:18 PMapiDomain
value in the appInfo
config is your custom domain?user
10/23/2021, 1:30 PM/dev
stage.rp
10/23/2021, 1:34 PMapiDomain
should not contain any pathrp
10/23/2021, 1:34 PMrp
10/23/2021, 1:41 PM{
...
apiDomain: "YOUR CUSTOM API DOMAIN WITHOUT A PATH",
apiGatewayPath: "/dev"
}
And see if this works. This assumes that you query "https://yourcustomdomain.com/dev/auth/signup POST" via postman.
If on the other hand, your custom domain points to /dev/*, then you don't need the apiGatewayPath
user
10/23/2021, 1:43 PMapi.tonka.com
it points to api.awsapigateway.com/dev
, which works but if I try to hit api.tonka.com/dev
then that breaks because it tries to hit api.awsapigateway.com/dev/dev
which doesn't exist, right.
so, in the config I have only apiDomain
with api.tonka.com
and I have no apiGatewayPath
set cause that will break.rp
10/23/2021, 1:44 PMrp
10/23/2021, 1:46 PMrp
10/23/2021, 1:51 PMmiddleware()
like so:
module.exports.handler = middy(middleware((event, context, callback) => {
console.log("middleware did not find any route to handle...");
})).use(cors({
origin: getBackendConfig().appInfo.websiteDomain,
credentials: true,
headers: ["Content-Type", ...supertokens.getAllCORSHeaders()].join(", "),
methods: "OPTIONS,POST,GET,PUT,DELETE"
}));
And see if the message "middleware did not find any route to handle..." get's printed out or not.user
10/23/2021, 3:09 PMevent,context,callback
as arguments to the middleware
function.
the type you have exposed is export declare const middleware: () => import("aws-lambda").Handler<any, any>;
rp
10/23/2021, 3:17 PMuser
10/23/2021, 3:28 PMrp
10/23/2021, 3:28 PMrp
10/23/2021, 3:28 PMrp
10/23/2021, 3:29 PMrp
10/23/2021, 3:30 PMuser
10/23/2021, 3:43 PMrp
10/23/2021, 3:49 PMresult
here: https://github.com/supertokens/supertokens-node/blob/master/lib/build/framework/awsLambda/framework.js#L232
3) https://github.com/supertokens/supertokens-node/blob/master/lib/build/supertokens.js#L142. Add a random console log here as well (before the path
variable is created). If (1) is getting printed out, then this one should as well.
4) Add a random console log here: https://github.com/supertokens/supertokens-node/blob/master/lib/build/supertokens.js#L150 (before requestRID
is created). If this doesn't get printed out, it means that the middleware is not handling requests cause it thinks the request path is not something it should handle. In this case, you want to see the value of this path
variable: https://github.com/supertokens/supertokens-node/blob/master/lib/build/supertokens.js#L142
If you want, we can even get on a call to do this together so that we can find the issue more quickly. Otherwise lmk about the results of the above please 🙂user
10/23/2021, 5:52 PMthis.errorHandler
, right before if (error_1.default.isErrorFromSuperTokens(err)) {
I logged the error object just to check whether any errors are thrown. well, there is an error. 😄
ST err: Error: The running SuperTokens core version is not compatible with this NodeJS SDK. Please visit https://supertokens.io/docs/community/compatibility to find the right versions
at Querier.<anonymous> (/var/task/node_modules/supertokens-node/lib/build/querier.js:88:27)
rp
10/23/2021, 5:52 PMuser
10/23/2021, 5:52 PMhttps://supertokens.io/docs/community/compatibility
I got an empty web page...user
10/23/2021, 5:52 PMrp
10/23/2021, 5:53 PM