getting this error in the console on the client side
Access to fetch at 'https://api-development.bitcoinerfreelance.com/auth/session/refresh' from origin 'https://development.bitcoinerfreelance.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: 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.
Here is my Cors implementation on the back end
app.use(
cors({
origin: websiteDomain,
allowedHeaders: ["content-type", ...supertokens.getAllCORSHeaders()],
methods: ["GET", "PUT", "POST", "DELETE"],
credentials: true,
})
);
and my Supertokens init
supertokens.init({
framework: "express",
supertokens: {
// TODO AARON - in production need to swap this with the connection for supertokens
connectionURI: configData.superTokens.connectionURI,
apiKey: configData.superTokens.apiKey,
},
appInfo: {
appName: "Bitcoiner Freelance",
apiDomain: apiDomain,
websiteDomain: websiteDomain,
apiBasePath: "/auth",
websiteBasePath: "/auth",
},