We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51f3c27 commit fd96febCopy full SHA for fd96feb
packages/shopify-api/lib/auth/oauth/oauth.ts
@@ -94,9 +94,12 @@ export function begin(config: ConfigInterface): OAuthBegin {
94
95
await cookies.setAndSign(STATE_COOKIE_NAME, state, {
96
expires: new Date(Date.now() + 60000),
97
- sameSite: 'lax',
98
- secure: true,
+ // hack necessary due to browsers not setting cookies with sameSite=lax
+ // https://github.com/Shopify/shopify-api-js/pull/905
99
+ sameSite: 'none',
100
+ secure: true, // needs to be true, especially when sameSite=none
101
path: callbackPath,
102
+ domain: config.cookieDomain || undefined,
103
});
104
105
const query = {
0 commit comments