bjoluc/next-redux-cookie-wrapper

CookieConfig not being used on client

Pikachews opened this issue ยท 3 comments

I noticed that my cookieConfig settings weren't taking effect on the client, whether it was changing the persist key or the cookie expiration.

The root cause seems to be that the cookieConfigs are only being used on the server.

storage: new CookieStorage(cookies, {
...sharedCookieConfig,
setCookieOptions: {
...sharedCookieConfig.setCookieOptions,
httpOnly: false, // Allow modifications on the client side
},
}),

Whereas on the client, no cookieConfig is being used:

storage: new CookieStorage(ClientCookies),

storage: new CookieStorage(cookies),

๐ŸŽ‰ This issue has been resolved in version 1.1.2 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

Wow, the bot was faster than me ๐Ÿ˜„ Anyway, thanks for pointing this out!

Thanks for the quick fix!