Skip to content

Releases: adonisjs/session

Add session.untag and session.supportsTagging methods

02 Feb 11:02

Choose a tag to compare

8.0.0-next.5 (2026-02-02)

Features

  • export session.untag via the session object (603d838)

Full Changelog: v8.0.0-next.4...v8.0.0-next.5

Add support for untagging a session

02 Feb 09:36

Choose a tag to compare

Pre-release

8.0.0-next.4 (2026-02-02)

Features

  • implement untag method for memory and redis stores (8cc39e7)

Full Changelog: v8.0.0-next.3...v8.0.0-next.4

Breaking - Do not store multipart files in flash messages

01 Feb 06:00

Choose a tag to compare

8.0.0-next.3 (2026-02-01)

Features

  • do not flash multipart files (dbbdc2c)

BREAKING CHANGES

  • Flashing multipart files has no utility and just pollutes the session data store. However, if there were apps relying on flashed multipart files, then they must upgrade their apps to explicitly flash properties from the multipart file

Full Changelog: v8.0.0-next.2...v8.0.0-next.3

DB Adapter and Tagging support

20 Dec 21:03

Choose a tag to compare

Pre-release

8.0.0-next.2 (2025-12-20)

Features

  • port DB adapter + tagging to v8 (6416ebc)

Bug fix around database tagging

20 Dec 20:15

Choose a tag to compare

7.7.1 (2025-12-20)

Bug Fixes

  • database: preserve session tag when called before commit (f5ce7b0), closes #95

Bug fixes and update dependencies

19 Dec 06:28

Choose a tag to compare

Pre-release

8.0.0-next.1 (2025-12-19)

Bug Fixes

  • explicitly remove maxAge and expires attributes when clearWithBrowser is enabled (7357c42)
  • types issues (3303e14)

Full Changelog: v8.0.0-next.0...v8.0.0-next.1

Session Collection

17 Dec 14:42

Choose a tag to compare

Session Tagging & SessionCollection

This release adds session tagging support and a new SessionCollection API for programmatic session management.

New Features

Session Tagging

Link sessions to user IDs, enabling features like "Logout from all devices" or displaying active sessions in account settings.

// Tag the current session after login
await session.tag(String(user.id))

SessionCollection API

Manage sessions programmatically outside of HTTP requests:

import { SessionCollection } from '@adonisjs/session'

const sessionCollection = await app.container.make(SessionCollection)

await sessionCollection.get(sessionId)           // Get session data
await sessionCollection.destroy(sessionId)       // Destroy a session
await sessionCollection.tag(sessionId, userId)   // Tag a session
await sessionCollection.tagged(userId)           // Get all sessions for a user

Supported Stores

Session tagging is supported by redis, database, and memory stores only.

Database Migration

If using the database store, run node ace make:session-table for new projects, or add the user_id column to existing sessions tables:

table.string('user_id').nullable().index()

Commits

  • add support for tagging + SessionCollection (#94) (a51e388)

Add database provider for storing session data

09 Dec 05:19

Choose a tag to compare

7.6.0 (2025-12-09)

Bug Fixes

Features

What's Changed

Full Changelog: v7.5.1...v7.6.0

Flash message changes and target v7

09 Sep 05:52

Choose a tag to compare

Pre-release

8.0.0-next.0 (2025-09-09)

In this release, we remove the deprecated errors property from the flash messages and you must rely on the inputErrors property instead to read input validation errors. Also, for Inertia applications, we no longer flash input data

Bug Fixes

  • pin swc as it is broken (abe3770)

Features

  • do not flash input data for inertia requests (91b60ee), closes #89

BREAKING CHANGES

  • Remove deprecated errors property from the flash message
    and instead rely on inputErrors property

Full Changelog: v7.5.1...v8.0.0-next.0

Update dependencies

16 Jan 06:30

Choose a tag to compare

7.5.1 (2025-01-16)

Full Changelog: v7.5.0...v7.5.1