https://supertokens.com/ logo
r

Rob Schilder

06/27/2022, 3:24 PM
Hi, We are having trouble with requesting our backend from different origin(s). Due to
sameSite: lax
the tokens are not passed to the request and therefore all requests to our supertokens backend are unauthorized.
Copy code
supertokens.init({
    ...frontendConfig().appInfo,
    cookieHandler: capacitorCookieHandler,
  })
The cookies are saved in localStorage. Do we need to create our own interceptor to add the cookies to the request headers?
r

rp

06/27/2022, 3:26 PM
Hey!
The tokens should not be saved in localstorage.
Also, you can set sameSite to none on the backend and it should work
r

Rob Schilder

06/27/2022, 6:00 PM
makes sense thanks!