Hello team, for my development environment api domain and website domain are same which is why sameSite is set to strict by the sdk .
This makes it difficult for the testing purposes where the frontend localhost needs to consume backend development environments as it prevents because localhost is treated as third party .
I read the docs and found out a way to manually set the cookieSameSite=None in the init which will solve the problem but will compromise the security as the system would be more prone to csrf attacks , is there any other recommended way to do it ?
r
rp_st
04/17/2024, 4:58 AM
hey @Tushar we never set the sameSite to strict on our own. Please check your session.init settings on the backend - maybe you have set it to that?
t
Tushar
04/17/2024, 4:59 AM
Even if its set to lax it won't allow all requests from localhost
r
rp_st
04/17/2024, 5:51 AM
well yea, there is no way around this. It's a browser behaviour
rp_st
04/17/2024, 5:51 AM
you can switch to using header based auth instead.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).