https://supertokens.com/ logo
#support-questions
Title
# support-questions
s

soumyabishi

07/06/2022, 5:52 AM
Hi, can I send cross domain cookie to verify a session?
r

rp

07/06/2022, 6:00 AM
Hey!
Hey!
s

soumyabishi

07/06/2022, 6:01 AM
HI
r

rp

07/06/2022, 6:01 AM
So the websiteDomain and apiDomain don't share any common domain?
s

soumyabishi

07/06/2022, 6:02 AM
Yes, both are different
r

rp

07/06/2022, 6:02 AM
So you can give that setting in the backend SDK and it should automatically put the sameSite cookie setting to "none", and then it would work
What config have you provided in the backend SDK supertokens.init?
Whats the value of:
Copy code
apiDomain: "XXX",
websiteDomain: "XX",
s

soumyabishi

07/06/2022, 6:15 AM
Copy code
apiDomain: "api.tidyhire.app",
        websiteDomain: "https://beta.tidyhire.app",
r

rp

07/06/2022, 6:16 AM
right. So this is not really a cross site issue since they both share the "tidyhire.app" part
On the frontend, are you adding interceptors to axios?
s

soumyabishi

07/06/2022, 6:16 AM
Actually I am trying to make an api call through a chrome extension from a different domain
r

rp

07/06/2022, 6:16 AM
i mean supertokens interceptors
hmmm
so then in the Session.init part, you can set cookieSameSite: "none"
this should allow the cookies to be sent
s

soumyabishi

07/06/2022, 6:16 AM
okay
Let me try
Thank you 😄
Cookie has been set
But, I am getting cors issue
r

rp

07/06/2022, 6:40 AM
hmm
well, you also wanna add
https://www.linkedin.com
to the array
and not just
https://linkedin.com
s

soumyabishi

07/06/2022, 6:42 AM
It's already in that array
r

rp

07/06/2022, 6:43 AM
s

soumyabishi

07/06/2022, 6:43 AM
oh okay
r

rp

07/06/2022, 6:43 AM
the www is important
s

soumyabishi

07/06/2022, 10:12 AM
tried this with https://www.linkedin.com
still no luck
r

rp

07/06/2022, 10:12 AM
whats the error?
and what is the response from the OPTIONS API headers?
s

soumyabishi

07/06/2022, 10:15 AM
it's working now
it was a typo
r

rp

07/06/2022, 10:16 AM
cool