Skip to content

Commit

Permalink
Fix cookie token generation (#1294)
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardlyhel committed Aug 31, 2023
1 parent 883440f commit 345f06a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/popular-eyes-smell.md
@@ -0,0 +1,5 @@
---
'@shopify/hydrogen-react': patch
---

Fix incorrect creation of cookie token that only happens on specific dates
3 changes: 2 additions & 1 deletion packages/hydrogen-react/src/cookies-utils.tsx
Expand Up @@ -54,7 +54,8 @@ export function hexTime(): string {
.toString(16)
.toLowerCase();

return output.padStart(8 - output.length, '0');
// Ensure the output is exactly 8 characters
return output.padStart(8, '0');
}

export function getShopifyCookies(cookies: string): ShopifyCookies {
Expand Down

0 comments on commit 345f06a

Please sign in to comment.