Hi, I use localhost for local development at front and remote server at backend api. So when Im tryi...
i
Hi, I use localhost for local development at front and remote server at backend api. So when Im trying to connect that way by social, emailpassword or passwordless I get 401 error for endpoints. I think thats because localhost has another cookies domain and server cant get shared them. And the question is: how can i effectively connect from localhost at front to server at back to organise my local development and to make everything work fine?
r
Hey!
So whats the value of websiteDomain on the backend server?
i
i can say that not localhost
)
r
right.
i
I use localhost:3001 and for server websiteDomain !== localhost:3001
r
So you want to set
"cookieSameSite"
in session.init (on the backend) to
"none"
and then it should work
i
Hmmm, fine, i will try, thanks
It writes that connection by this way is not secure so throw net::ERR_CERT_AUTHORITY_INVALID
Is there another way to do what i want?
r
what did you change?
Is the backend API domain not using https?
i
i set to backend cookieSameSite=none
r
that has nothing to do with https though. So im not sure why this error is happening
For cookieSameSite: none to work, you need to use https for the apiDomain.
i
It was some hogvards-magic bug on deploy
Bc when i redeploy everything works fine
Thank you for solution
r
cool!
9 Views