diff --git a/examples/example-graphql/lib/drupal.ts b/examples/example-graphql/lib/drupal.ts index fdae367d..f1c78d5b 100644 --- a/examples/example-graphql/lib/drupal.ts +++ b/examples/example-graphql/lib/drupal.ts @@ -8,7 +8,6 @@ export const drupal = new DrupalClient( clientSecret: process.env.DRUPAL_CLIENT_SECRET, }, previewSecret: process.env.DRUPAL_PREVIEW_SECRET, - forceIframeSameSiteCookie: true, } ) diff --git a/packages/next-drupal/src/client.ts b/packages/next-drupal/src/client.ts index e646d3a7..7e22df04 100644 --- a/packages/next-drupal/src/client.ts +++ b/packages/next-drupal/src/client.ts @@ -113,8 +113,6 @@ export class DrupalClient { private previewSecret?: DrupalClientOptions["previewSecret"] - private forceIframeSameSiteCookie?: DrupalClientOptions["forceIframeSameSiteCookie"] - /** * Instantiates a new DrupalClient. * @@ -142,7 +140,6 @@ export class DrupalClient { auth, previewSecret, accessToken, - forceIframeSameSiteCookie = false, throwJsonApiErrors = true, } = options @@ -160,7 +157,6 @@ export class DrupalClient { this.previewSecret = previewSecret this.cache = cache this.accessToken = accessToken - this.forceIframeSameSiteCookie = forceIframeSameSiteCookie this.throwJsonApiErrors = throwJsonApiErrors // Do not throw errors in production. diff --git a/packages/next-drupal/src/types.ts b/packages/next-drupal/src/types.ts index 60c5c783..0e5c9730 100644 --- a/packages/next-drupal/src/types.ts +++ b/packages/next-drupal/src/types.ts @@ -139,16 +139,6 @@ export type DrupalClientOptions = { * The scope used for the current access token. */ accessTokenScope?: string - - /** - * If set to true, the preview cookie will be set with SameSite=None,Secure. - * - * * **Default value**: `false` - * * **Required**: *No* - * - * [Documentation](https://next-drupal.org/docs/client/configuration#forceiframesamesitecookie) - */ - forceIframeSameSiteCookie?: boolean } export type DrupalClientAuth = diff --git a/www/content/docs/configuration.mdx b/www/content/docs/configuration.mdx index 42d9f8ac..baaaec03 100644 --- a/www/content/docs/configuration.mdx +++ b/www/content/docs/configuration.mdx @@ -217,34 +217,6 @@ A long-lived access token you can set directly on the client. --- -### forceIframeSameSiteCookie - - - -Use `forceIframeSameSiteCookie` in development only. - - - -- **Default value**: `false` -- **Required**: No - -If you're running your site in development and the host address is different from the iframe preview, you might run into issues with `SameSite` cookies. - -You can use this option to force the cookie to be set to `SameSite=None,Secure` in **development**. - -```ts -export const drupal = new DrupalClient( - process.env.NEXT_PUBLIC_DRUPAL_BASE_URL, - { - forceIframeSameSiteCookie: process.env.NODE_ENV === "development", - } -) -``` - -For more info see: https://github.com/vercel/next.js/discussions/32238 - ---- - ### debug - **Default value**: `false`