Skip to content
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

Sessions #469

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Sessions #469

wants to merge 5 commits into from

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Dec 5, 2024

Changes

  • What does this change?
  • Be short and concise. Bullet points can help!
  • Before/after screenshots can help as well.
  • Don't forget a changeset! pnpm exec changeset

Testing

Docs

Copy link

changeset-bot bot commented Dec 5, 2024

⚠️ No Changeset found

Latest commit: a9eb6b2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added pkg: cloudflare pkg: netlify pkg: node Related to Node adapter (scope) pkg: vercel Related to Vercel adapter (scope) labels Dec 5, 2024
@ascorbic ascorbic force-pushed the sessions branch 3 times, most recently from d731985 to 33bec6c Compare December 5, 2024 17:15
@alexanderniebuhr
Copy link
Member

@ascorbic let me know if I can help adding a default driver for the Cloudflare adapter once Sessions get's stable

@ascorbic
Copy link
Contributor Author

@alexanderniebuhr it would be great if you could help get Cloudflare support working. Would the user need to enable KV themselves, or could we do it automatically?

@alexanderniebuhr
Copy link
Member

@ascorbic happy to help getting this to work with Cloudflare.

Would the user need to enable KV themselves, or could we do it automatically?

This depends a bit on what we need. I don't think we can add a KV Namespace for the user, unless we would have an API Token of them. However we can definitely streamline the needed configuration, so the user only has to provide an binding id after they created the namespace in the Dashboard.

Where can I take a look at what is needed, so I can try to figure it out for Cloudflare?

@ascorbic
Copy link
Contributor Author

ascorbic commented Jan 28, 2025

@alexanderniebuhr the config info is here. Users can already configure the cloudflare drivers themselves, so it would be worth trying that yourself. The goal would be to see how much of that we could do for them. Right now the way to manually do it would be something like:

experimental: {
  session: {
    driver: "cloudflare-kv-binding",
    options: {
      binding: "SESSIONS"
    }
  }
}

I guess it might be done something like:

adapter: cloudflare({
  sessionBinding: "SESSIONS"
}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: cloudflare pkg: netlify pkg: node Related to Node adapter (scope) pkg: vercel Related to Vercel adapter (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants