hello! my electron app is working fine using my lo...
# support-questions-legacy
d
hello! my electron app is working fine using my local express server. using my production server, i am able to log in and log out, with cookies being set and sent correctly to the signinup and signout endpoints. all other requests to my own endpoints, cookies are not sent or set. they are still stored in localstorage using the custom cookieHandler from the example on github
r
Hey @djarran
@nkshah2 can help here when he is available.
d
okay, no problem
n
Hi @djarran , Can you share the full config you pass to supertokens init in your electron app?
d
sure
if (typeof window !== "undefined") { supertokens.init({ appInfo: { appName: "", apiDomain: process.env.REACT_APP_API_BASE_URL, websiteDomain: process.env.REACT_APP_CLIENT_URL, apiBasePath: "/auth", websiteBasePath: "/auth" }, cookieHandler: getCookieHandler, windowHandler: getWindowHandler, recipeList: [ ThirdPartyEmailPassword.init({ contactMethod: "EMAIL", signInAndUpFeature: { providers: [ Github.init(), Google.init(), Facebook.init(), Apple.init(), ] }, preAPIHook: async (context) => { let url = context.url; // is the fetch config object that contains the header, body etc.. let requestInit = context.requestInit; let clientType = window?.env?.clientType || 'webapp' if (context.action === 'GET_AUTHORISATION_URL') { let newUrl = context.url +
&clientType=${clientType}
context.url = newUrl return context } return { requestInit, url } }, onHandleEvent: async (context) => { if (context.action === "SESSION_ALREADY_EXISTS") { } else { if (context.action === "SUCCESS") { }} }}), Session.init() ] }); }
n
Are you using fetch or axios for your network requests?