Repository navigation
fix: set the Strapi peer floor to 5.50.0, the first version the plugin works on - #23
Merged
Merged
Conversation
…n works on The @strapi/strapi and @strapi/plugin-users-permissions peers said ^5.0.0, but nothing below the current release was ever tested. The plugin calls listSessions and revokeSessionById on Strapi's session manager and reads the metadata column of admin::session, all added in Strapi 5.50.0 (strapi/strapi#26628, "add active devices session management"). Measured with the real-HTTP suites on isolated hosts (synthetic data, random secrets, egress blocked): - 5.0.4, 5.23.6: no strapi.sessionManager and no admin::session (added 5.24.0); 5.0.0-5.0.3 also declare node <=20, outside our engines. - 5.24.0, 5.30.0, 5.40.0, 5.45.0, 5.49.0: refresh-mode sign-in fails closed with 503, session routes fail, admin panel sessions return 500. - 5.50.0, 5.62.0: every suite passes; the packed tarball installs on 5.50.0 without peer warnings and the admin panel builds and renders. - Peers ^5.50.0; one clear start-up error on older Strapi. - CI job strapi-floor runs the HTTP suites against Strapi 5.50.0. - Native capture provider-callback case sends the token in the query too (5.50 reads the query, 5.62 the grant session). - README badge and Compatibility, Pages, CHANGELOG with upgrade note. Docs read: Strapi release notes v5.13.0, v5.24.0, v5.50.0 (gh release view, 2026-11-18); docs.strapi.io/cms/upgrade-tool; installed @strapi/core, @strapi/admin and @strapi/plugin-users-permissions sources 5.24.0-5.62.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 18, 2026
## [4.14.1](v4.14.0...v4.14.1) (2026-11-18) ### Bug Fixes * set the Strapi peer floor to 5.50.0, the first version the plugin works on ([#23](#23)) ([a9f522f](a9f522f)) Release type: patch (`fix`). This corrects an untested compatibility claim; it is not a breaking change, because the plugin never worked fully on the Strapi versions now excluded. ### Fixed * **Strapi peer floor corrected from `^5.0.0` to `^5.50.0`** (`@strapi/strapi` and `@strapi/plugin-users-permissions`). The old range was never tested. Strapi 5.50.0 added the session-manager methods the plugin calls (`listSessions`, `revokeSessionById`) and the `metadata` column of `admin::session` ([strapi/strapi#26628](strapi/strapi#26628)). Measured with the real-HTTP suites on isolated hosts: on 5.24.0, 5.30.0, 5.40.0, 5.45.0 and 5.49.0, sign-in with `jwtManagement: 'refresh'` fails closed with 503, session list and revoke routes fail, and the Admin panel sessions routes return 500 in both JWT modes; 5.0.4 and 5.23.6 have no session manager or `admin::session` at all; 5.0.0 to 5.0.3 declare Node.js 20 or older, outside this plugin's `engines`. On 5.50.0 and 5.62.0 every suite passes. * The plugin logs one clear error at start-up on Strapi older than 5.50.0 (`Strapi 5.x.y is not supported: Magic Session Manager requires Strapi 5.50.0 or later …`) instead of failing later on single requests. * README badge, Compatibility table and project site now say Strapi 5.50+. ### Upgrade note * Strapi 5.50.0 or later: nothing to do. * Strapi older than 5.50.0: upgrade Strapi first (`npx @strapi/upgrade minor`), rebuild the admin and restart. npm 7+ refuses to install this release next to an older Strapi because of the peer range; until you upgrade Strapi, stay on your current plugin version. ### Tests * New CI job `strapi-floor` installs Strapi 5.50.0 and Users & Permissions 5.50.0 into a separate directory and runs the HTTP access suite (legacy, refresh, fallback logout), the admin panel sessions suite and the native session capture suite against it. * `tests/strapi-version-floor.test.js` checks the floor constant, the start-up error, that the peers and the CI job name the same floor. * The native capture suite's provider-callback case now also sends the provider token in the query string, which Strapi 5.50 reads (5.62 reads the grant session), so it runs on both versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
@strapi/strapiand@strapi/plugin-users-permissionspeers said^5.0.0(README badge "Strapi 5.0+"), but CI only ever tested the current Strapi. Testing the declared floor shows the plugin needs Strapi 5.50.0. This PR corrects the claim (patch,fix:; older hosts never worked fully, so this is not a breaking change).Evidence per API
strapi.sessionManager,admin::session, U&PjwtManagement(refresh/legacy-support)listSessions,revokeSessionById,findByUser;admin::session.metadata(device label)app.widgets.register)@strapi/strapi/adminPage/Layouts/Form/Blocker/useForm/...)strapi buildpasses, names checked against installed exports@strapi/sdk-plugin6.1.1 outputnode <=20.x; 5.0.4+ include 22; 5.50.0 declares>=20 <=26npm view @strapi/strapi@X enginesvs plugin^22.22.2 || >=24.15.0Real-HTTP suites per Strapi version
Isolated hosts in a scratch directory (synthetic users, random secrets, outbound network blocked), Node 22.23.1, SQLite.
sessionManager)Packed tarball on a 5.50.0 app: strict
npm install(no--legacy-peer-deps) without peer errors, one@strapi/utils(5.50.0, deduped), one React / styled-components / react-router-dom; refresh-mode register + login returnjwtandrefreshToken;strapi buildpasses; browser smoke (Playwright, 1440 px) of home widget, App users dashboard, Admin panel sessions, Settings > Configuration and Analytics: expected content rendered, 0 px overflow, no page errors, no failed plugin API calls (only console errors: Strapi core's blocked GitHub update check).Changes
peerDependencies:@strapi/strapiand@strapi/plugin-users-permissions^5.50.0(lockfile synced).server/src/utils/strapi-version.js+register.js: one clear start-up error on Strapi older than 5.50.0.strapi-floor: installs Strapi 5.50.0 + U&P 5.50.0 in$RUNNER_TEMPand runs all five real-HTTP runs.tests/strapi-version-floor.test.js(new, written failing first) and a portable provider-callback case intests/isolated-native-capture-http.test.js(5.50 reads the token from the query, 5.62 from the grant session).[Unreleased]with upgrade note.Gate (local, commit 0b975d2)
npm run lint0 problems,npm run format:checkclean,npm test864/864,test:ts:frontandtest:ts:backpass,build,verify,verify:runtimepass, CHANGELOG checkCHANGELOG_OK.Release type: patch (
fix:).🤖 Generated with Claude Code