For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
I'm building an app using the Remix template and I'm currently stuck on trying to implement cookie-based session authentication (Remix Sessions):
createCookieSessionStorage({
cookie: {
name: "auth-session-cookie",
secure: true,
secrets: ["example"],
sameSite: "none",
maxAge: 300,
path: "/",
},
});
The authentication works when accessing the app through Shopify Admin but for some reason, it does not work when accessing the app via the POS.
After some testing, it seems like the returned 'Set-Cookie' header does not actually create the cookie in the built-in browser of the POS app.
return redirect("/app/auth", {
headers: {
"Set-Cookie": await commitSession(storageSession),
},
});
Does the built-in browser of the POS support cookies at all, am I maybe missing some settings?
Hey @Mittlus
Please post this question here: https://github.com/Shopify/shopify-app-template-remix
Scott | Developer Advocate @ Shopify
I don't think there's an issue with the Remix implementation, as I also tried to set and read a cookie with plain Javascript (which also did not work).