Skip to content

Conversation

@ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Apr 2, 2025

Changes

Adds support for loading a session by ID

Adds a new session.load() method to the experimental session API that allows you to load a session by ID. In normal use a session is loaded automatically from the session cookie. This method allows a session to be loaded manually instead. This has been requested in the RFC, and is useful for cases where the session ID has been persisted somewhere other than the browser cookie. For example, a session ID might be stored in a user database. This would allow that user's session to be loaded when logging-in on another device or in a different browser. It would also allow a session to be loaded in an API when cookies can't be set, such as when loading across domains.

Testing

Added tests

Docs

I will do a separate docs PR

@changeset-bot
Copy link

changeset-bot bot commented Apr 2, 2025

🦋 Changeset detected

Latest commit: 66dccbc

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Apr 2, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 2, 2025

CodSpeed Performance Report

Merging #13539 will not alter performance

Comparing session-replace (66dccbc) with main (b8645c1)

Summary

✅ 6 untouched benchmarks

@ascorbic ascorbic merged commit c43bf8c into main Apr 2, 2025
16 checks passed
@ascorbic ascorbic deleted the session-replace branch April 2, 2025 10:30
@astrobot-houston astrobot-houston mentioned this pull request Apr 2, 2025
@ascorbic ascorbic added this to the v5.6.0 milestone Apr 2, 2025
@ascorbic ascorbic self-assigned this Apr 2, 2025
openscript pushed a commit to openscript/astro that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants