-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createCookieSessionStorage is no longer exported server-runtime in v1.3.3 #2503
Comments
Same for createCloudflareKVSessionStorage, since upgrading from 1.3.2 to 1.3.3 it throws with:
|
I have this issue as well |
We expect users to import from one of our concrete server runtime packages (i.e. We don't currently consider If you have a specific use-case that somehow requires importing directly from |
@pcattori for everyone who cannot use the if I update the import from
|
@garth Previously we recommended importing from Could you provide more info about the error you're seeing e.g. what your usage looks like and what file the error points to? |
I created a new Remix app using Remix App Server and then added this to import { createCookieSessionStorage } from "@remix-run/node";
export const loader = () => {
const sessionStorage =
createCookieSessionStorage({
// a Cookie from `createCookie` or the same CookieOptions to create one
cookie: {
name: "__session",
secrets: ["r3m1xr0ck5"],
sameSite: "lax",
},
});
console.log(sessionStorage)
return null
} Using v1.3.3 and this works locally for me. I'm able to hit localhost:3000 with my browser and see the session storage functions getting logged. |
I had many imports from Glad to hear that you will update the docs. Clearer instructions will help clarify a lot of details that we are currently getting from snippets from twitter or elsewhere. |
@pcattori The cookie-signature lib on which @remix-run/node depends uses Node crypto which Pages environment does not support. Any Web Crypto implementation for sign and unsign functions that Remix createCookieFactory function take? Thank you. Update: Now I make it work by copying crypto implementation in @remix-run/cloudflare to crypto.ts file and import those 2 functions (sign and unsign) to use. However, I cannot Here is the error when trying to
|
@supachaidev yes you should use |
@tonymartin-dev remix/packages/remix-node/index.ts Lines 24 to 29 in 2262dd9
|
What version of Remix are you using?
v1.3.3
Steps to Reproduce
Upgrade from v1.3.2 where server-runtime exported createCookieSessionStorage and now it is no longer there.
Expected Behavior
It should still be exported.
Actual Behavior
x
The text was updated successfully, but these errors were encountered: