wp-graphql-headless-login icon indicating copy to clipboard operation
wp-graphql-headless-login copied to clipboard

SetCookie Header didn't specify a "SameSite" attribute - Set Authentication Cookie Option

Open jimmysafe opened this issue 6 months ago • 6 comments

Description

Hi,

I have created a simple React App (running on http://localhost:5173) that fetches data through WPGraphql. I have installed wp-graphql-headless-login in order to get Social login features (Google and Facebook).

I am in the process of configuring the Google auth and i would like the wp-headless-login plugin to set the wp authentication cookie automatically on login success.

I am now able to login and create the logged in user automatically in wordpress. The problem i am facing is that the wp auth cookie does not get set because it is lacking of the SameSite attribute. I can see that the request tries to set the wp auth cookie but it does not get set.

Here is a screenshot:

Screenshot 2023-12-21 at 18 28 21

There is no way for me within the plugin to change the SameSite attribute to none ?

here is my plugin configuration

Screenshot 2023-12-21 at 18 30 00.

Steps to reproduce

  1. Install the plugin
  2. add a Google provider along with CLIENT ID and CLIENT SECRET.
  3. In the plugin Login Settings TURN ON all settings.
  4. In the plugin Access Control Settings TURN ON Block unauthorized domains and Add ACAC.
  5. Set the locally running react frontend url in the authorized domains.

Additional context

No response

Plugin Version

0.1.4

WordPress Version

6.4.2

WPGraphQL Version

1.19.0

Additional enviornmental details

No response

Please confirm that you have searched existing issues in the repo.

  • [X] Yes

Please confirm that you have disabled ALL plugins except for WPGraphQL and Headless Login for WPGraphQL

  • [X] Yes
  • [ ] My issue is with a specific 3rd-party plugin.

jimmysafe avatar Dec 21 '23 17:12 jimmysafe