Ayush6543
01/03/2023, 9:24 AMapp.use(
cors({
origin: "https://loquacious-crostata-a45e75.netlify.app",
allowedHeaders: ["content-type", ...supertokens.getAllCORSHeaders()],
credentials: true,
})
);
rp
01/03/2023, 11:15 AMAyush6543
01/03/2023, 12:51 PMrp
01/03/2023, 12:59 PMAyush6543
01/03/2023, 1:10 PMrp
01/03/2023, 1:12 PM...supertokens.getAllCORSHeaders()
part of the codeAyush6543
01/03/2023, 1:13 PMrp
01/03/2023, 1:21 PMAyush6543
01/03/2023, 1:38 PMrp
01/03/2023, 1:39 PMKShivendu
01/03/2023, 1:42 PMAyush6543
01/03/2023, 1:43 PMKShivendu
01/03/2023, 1:43 PMAyush6543
01/03/2023, 1:45 PMKShivendu
01/03/2023, 1:47 PMAyush6543
01/03/2023, 1:48 PMsupertokens.init({
framework: "express",
supertokens: {
connectionURI: `${process.env.SUPERTOKENS_CONNECT_URL}`,
apiKey: `${process.env.SUPERTOKENS_API_KEY}`,
},
appInfo: {
// learn more about this on https://supertokens.com/docs/session/appinfo
appName: "Todo-list",
apiDomain: `${process.env.API_DOMAIN}`,
websiteDomain: `${process.env.WEBSITE_DOMAIN}`,
apiBasePath: "/dev/auth",
},
recipeList: [
UserMetadata.init(),
ThirdPartyEmailPassword.init({
providers: [
Google({
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
clientId: process.env.GOOGLE_CLIENT_ID,
}),
],
}),
Session.init(), // initializes session features
UserRoles.init(),
Dashboard.init({
apiKey: `${process.env.DASHBOARD_API_KEY}`, // give a custom api key for domain
}),
EmailVerification.init({
mode: "OPTIONAL",
}),
],
isInServerlessEnv: true,
});
KShivendu
01/03/2023, 1:51 PMAyush6543
01/03/2023, 1:56 PMKShivendu
01/03/2023, 1:57 PMts
appInfo: {
// learn more about this on https://supertokens.com/docs/session/appinfo
appName: "Todo-list",
apiDomain: `${process.env.API_DOMAIN}`,
websiteDomain: `${process.env.WEBSITE_DOMAIN}`,
apiBasePath: "/auth", // note this
apiGatewayPath: "/dev" // note this
},
frontend:
js
apiBasePath: "/dev/auth"
Ayush6543
01/03/2023, 2:22 PMgoogle:1
Access to fetch at 'https://x6dsgtj144.execute-api.eu-central-1.amazonaws.com/dev/auth/signinup' from origin 'https://loquacious-crostata-a45e75.netlify.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled
@KShivendu @rprp
01/04/2023, 5:21 AMAyush6543
01/04/2023, 5:26 AMrp
01/04/2023, 5:29 AMAyush6543
01/04/2023, 5:30 AMrp
01/04/2023, 5:31 AMAyush6543
01/04/2023, 5:41 AMrp
01/04/2023, 5:41 AMAyush6543
01/04/2023, 5:41 AMrp
01/04/2023, 5:43 AMAyush6543
01/04/2023, 5:54 AMAccess to fetch at 'https://x6dsgtj144.execute-api.eu-central-1.amazonaws.com/dev/auth/signinup' from origin 'https://loquacious-crostata-a45e75.netlify.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled
rp
01/04/2023, 6:21 AM