Alankazam
07/21/2022, 3:43 PM{
"error": "The middleware couldn't serve the API path /signin, method: post. If this is an unexpected behaviour, please create an issue here: https://github.com/supertokens/supertokens-node/issues"
}
Note¹: The /signup path works normally.
Note²: I'm using the following recipes in order: Session, UserMetadata, UserRoles, PasswordLess, EmailPassword
Can you tell me how I can diagnose this problem?rp_st
07/21/2022, 4:07 PMAlankazam
07/21/2022, 4:09 PMrp_st
07/21/2022, 4:09 PMAlankazam
07/21/2022, 4:10 PMimport middy from '@middy/core';
import cors from '@middy/http-cors';
import { log } from 'i-logs';
import { errorResponse } from 'i-response-message';
import supertokens from 'supertokens-node';
import { middleware } from 'supertokens-node/framework/awsLambda';
import { handleAnyError } from '../../application/utils/exceptions';
import { getSuperTokensConfig } from '../supertokens/config';
import { ALLOW_HEADERS } from '../utils/corsResponse';
supertokens.init(getSuperTokensConfig());
export const authentication = middy(middleware())
.use(cors({
credentials: true,
origin: getSuperTokensConfig().appInfo.websiteDomain,
headers: ALLOW_HEADERS,
}))
.onError((response) => {
log('ERROR:: authentication::', response.error);
const handledError = handleAnyError(response.error);
return errorResponse(handledError.statusCode, handledError);
});
rp_st
07/21/2022, 4:10 PMAlankazam
07/21/2022, 4:10 PMrp_st
07/21/2022, 4:11 PMAlankazam
07/21/2022, 4:11 PMrp_st
07/21/2022, 4:11 PMAlankazam
07/21/2022, 4:12 PMrp_st
07/21/2022, 4:12 PM