This is the response I get when I click the Sign In With Google button or Facebook (see attached images).
My frontend is still hosted locally:
http://localhost:3000
But my backend is forwarded with:
https://fccd-****ngrok.io
Supertokens
Code:
Backend Node (config.ts):
export const SuperTokensConfig: TypeInput = {
supertokens: {
connectionURI: "http://127.0.0.1:3567",
},
appInfo: {
appName: "SuperTokens Demo App",
apiDomain: "https://fccd-****.ngrok.io",
websiteDomain: "http://localhost:3000",
},
...
Frontend React(config.tsx):
export const SuperTokensConfig = {
appInfo: {
appName: "SuperTokens Demo App",
apiDomain: "https://fccd-****.ngrok.io",
websiteDomain: "http://localhost:3000",
},
Cors:
app.use(
cors({
origin: "http://localhost:3000",
allowedHeaders: ["content-type", ...supertokens.getAllCORSHeaders()],
methods: ["GET", "PUT", "POST", "DELETE"],
credentials: true,
})
);