1

I am a beginner and I am learning react js. In my project, I am using firebase. I have created a sign-in button but can't sign in with google.

I am getting this error:

Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute

How can I solve this problem?

Satyajit Roy
  • 517
  • 1
  • 5
  • 18

2 Answers2

0

set the header line in your server page (if in PHP) as below:

header("Set-Cookie: cross-site-cookie=whatever; SameSite=None; Secure");

Credits : https://pretagteam.com/question/indicate-whether-to-send-a-cookie-in-a-crosssite-request-by-specifying-its-samesite-attribute

Shubham soni
  • 76
  • 1
  • 4
0

That shouldn't interfere with the sign-in functionality because firebase handles most of the work internally within its services, with the functions returning only the necessary data object, For example signInWithCredential returns Promise.

The warning you are getting has to do with the cookies sent by the server-side and not your front end up: Check out a similar issue and a solution here . Therefore the issue can be resolved by firebase including the SameSite attribute in the cookie when sending response, not anything on your client-side.