strapi-plugin-magic-sessionmanager 4.12.0 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -2
- package/README.md +63 -34
- package/dist/admin/{Analytics-lP0-RsVd.js → Analytics-BikQQx_J.js} +1 -1
- package/dist/admin/{Analytics-C_c24Uzq.mjs → Analytics-DIY51RI_.mjs} +1 -1
- package/dist/admin/{App-DCyNPn1k.mjs → App-B3vaybSO.mjs} +433 -13
- package/dist/admin/{App-miWDdmdX.js → App-BV1LM9Bp.js} +433 -13
- package/dist/admin/{OnlineUsersWidget-C6wlwENC.mjs → OnlineUsersWidget-T-2upsDd.mjs} +1 -1
- package/dist/admin/{OnlineUsersWidget-C6b7e4jb.js → OnlineUsersWidget-fJogM1xl.js} +1 -1
- package/dist/admin/{Settings-D9zyn5xn.js → Settings-AyYka8wn.js} +1 -1
- package/dist/admin/{Settings-DssYw2W4.mjs → Settings-BpBlXyMY.mjs} +1 -1
- package/dist/admin/{de--yNl7MPl.mjs → de-BSCDuq1i.mjs} +38 -1
- package/dist/admin/{de-DjPEATFf.js → de-z0aHRwdw.js} +38 -1
- package/dist/admin/{en-5U7g51cH.mjs → en-B4Cuq9JN.mjs} +38 -1
- package/dist/admin/{en-BoO12UQw.js → en-BWPOiiMt.js} +38 -1
- package/dist/admin/{es-BLpEuycJ.js → es-CMskkUh-.js} +38 -1
- package/dist/admin/{es-BJR-zCXL.mjs → es-DBAmysKi.mjs} +38 -1
- package/dist/admin/{fr-CeeCYQCs.mjs → fr-BNGdtjEl.mjs} +38 -1
- package/dist/admin/{fr-BE828R9Q.js → fr-ClJ2BkrE.js} +38 -1
- package/dist/admin/{index-CfQOMZVX.js → index-DyE1rLW0.js} +22 -19
- package/dist/admin/{index-rbxJZcLv.mjs → index-mCVi1j7e.mjs} +22 -19
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/{pt-BWEFiuvo.js → pt-CRh_J7JS.js} +38 -1
- package/dist/admin/{pt-CorrU3yG.mjs → pt-Cl7TWsOV.mjs} +38 -1
- package/dist/server/index.js +721 -30
- package/dist/server/index.mjs +721 -30
- package/package.json +14 -7
- package/pics/analytics.png +0 -0
- package/pics/dashboard-dark.png +0 -0
- package/pics/dashboard.png +0 -0
- package/pics/dashboardsessionmodal.png +0 -0
- package/pics/mobile-dashboard.png +0 -0
- package/pics/mobile-session.png +0 -0
- package/pics/sessioninfopanel.png +0 -0
- package/pics/settings1.png +0 -0
- package/pics/settings2.png +0 -0
- package/pics/widget.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
## [4.13.1](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.13.0...v4.13.1) (2026-11-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **readme:** make images and links work on the Strapi marketplace ([#18](https://github.com/Schero94/Magic-Sessionmanager/issues/18)) ([825507a](https://github.com/Schero94/Magic-Sessionmanager/commit/825507a74d3a87761495462561339895414d00be))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
* README screenshots and links now work on the Strapi marketplace and on npm. Both render the packaged README relative to their own pages, so the relative `pics/...`, `LICENSE` and `CHANGELOG.md` references in 4.13.0 returned 404. Images now load from the project site and links point to GitHub. The README shows eight key screenshots and links the full gallery on the project site. A test fails on any relative image or link URL.
|
|
12
|
+
* The README dependency-advisory note now names the current Strapi core advisory (picomatch GHSA-fc5q-39xc-vjpf through `@strapi/utils`) instead of claiming 0 findings.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
* The npm package no longer ships the `pics/` folder (about 0.5 MB smaller); the README loads its images from the project site.
|
|
17
|
+
|
|
18
|
+
# [4.13.0](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.12.0...v4.13.0) (2026-11-12)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* explain and diagnose untracked Strapi sessions, link sign-ins outside intercepted routes ([#15](https://github.com/Schero94/Magic-Sessionmanager/issues/15)) ([0a8d584](https://github.com/Schero94/Magic-Sessionmanager/commit/0a8d584c1c802c61b412f581c8317a64a77fb336))
|
|
24
|
+
|
|
25
|
+
## 4.13.0 details (written before the release)
|
|
26
|
+
|
|
27
|
+
Release type: minor (`feat` and `fix`), no breaking change. No migration needed; existing routes and responses are unchanged, `GET /sessions/stats` gains one field.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
* **Strapi sessions created outside Strapi's own REST auth routes are now linked** (`jwtManagement: 'refresh'`). They used to stay without session details and showed up in the "open Strapi sessions" notice:
|
|
32
|
+
* hosts with a custom REST prefix (`api.rest.prefix`, for example `/v1`): no login, refresh, password change or logout was tracked;
|
|
33
|
+
* the GraphQL `login`, `register` and `emailConfirmation` mutations;
|
|
34
|
+
* custom login routes and other plugins that create a session with `strapi.sessionManager('users-permissions')` or the refresh-mode `jwt.issue()` and return the token in the response;
|
|
35
|
+
* intercepted routes whose response carries only an access token (refresh-mode `jwt.issue()`); they no longer fail closed, and an unawaited `jwt.issue()` Promise is resolved so the client gets a real token instead of `{}`.
|
|
36
|
+
* A sign-in that the plugin failed closed (503) before its Strapi session was resolved no longer leaves that Strapi session open.
|
|
37
|
+
* The untracked-session count no longer includes sessions past their absolute expiry (`absoluteExpiresAt`), which Strapi already rejects.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
* `GET /magic-sessionmanager/sessions/native-only/summary` (admin, `plugin::magic-sessionmanager.access`, read rate limit): count-only diagnostics of untracked Strapi sessions. Created before or after this plugin started tracking, per creation month, by how Strapi created them (sign-in with device details, password change or reset, token only), by device class (from Strapi's device label, first 2,000 rows) and expiring within 7 and 30 days. No session IDs, user data or IP addresses.
|
|
42
|
+
* `POST /magic-sessionmanager/sessions/native-only/end` (admin, `plugin::magic-sessionmanager.access`, signed-in administrators only, 5 requests per minute): ends untracked Users & Permissions sessions in batches of 200, at most 5,000 per request, and reports how many remain. Strapi administrator sessions, sessions listed in the plugin and sessions younger than two minutes are never touched. Logged with counts only.
|
|
43
|
+
* `GET /sessions/stats` returns `nativeOnlyAfterTracking`: untracked sessions created after the tracking start, or `null` when unknown. The tracking start is stored once at startup in refresh mode (plugin store key `nativeTracking`): the login time of the oldest linked session, or the first start of this version.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
* **Untracked-session notice on the dashboard.** The blue notice "N open Strapi sessions have no session details" is replaced. It now says these are still-valid Strapi sign-ins (refresh tokens) that are not in the list and are not active or online sessions. It is neutral when every one predates tracking (legacy, expires on its own) and a warning, "possible tracking gap", when any was created afterwards. "Why?" opens the summary; "End these sessions" ends them after a confirmation. "How sessions work" explains untracked sign-ins. All five languages.
|
|
48
|
+
|
|
49
|
+
### Known limits
|
|
50
|
+
|
|
51
|
+
* A session whose token never appears in the response that created it (a token sent by email or another channel, stored server-side, created by a background job) cannot be linked. It stays untracked and counts as "created after tracking". Return Strapi's `{ jwt, refreshToken }` from custom login code, or end such sessions from the dashboard.
|
|
52
|
+
|
|
1
53
|
# [4.12.0](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.11.0...v4.12.0) (2026-11-10)
|
|
2
54
|
|
|
3
55
|
|
|
@@ -5,9 +57,9 @@
|
|
|
5
57
|
|
|
6
58
|
* **sessions:** page, filter and count sessions on the server ([#9](https://github.com/Schero94/Magic-Sessionmanager/issues/9)) ([c389614](https://github.com/Schero94/Magic-Sessionmanager/commit/c38961432d4415ded4b9c37c80414dbe787e518a))
|
|
7
59
|
|
|
8
|
-
|
|
60
|
+
### 4.12.0 details
|
|
9
61
|
|
|
10
|
-
|
|
62
|
+
No breaking change. Callers of `GET /sessions` without paging parameters get the same response as before.
|
|
11
63
|
|
|
12
64
|
### Changed
|
|
13
65
|
|
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Schero94/Magic-Sessionmanager/main/docs/site/img/icon.svg" alt="Magic Session Manager icon" width="96" height="96" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# Magic Session Manager
|
|
2
6
|
|
|
3
7
|
**See who is signed in to your Strapi 5 app, end any session in one click, and stop password guessing before it reaches your users.**
|
|
@@ -9,11 +13,11 @@ Free and open source under the MIT license. Every feature works without an accou
|
|
|
9
13
|
[](https://www.npmjs.com/package/strapi-plugin-magic-sessionmanager)
|
|
10
14
|
[](https://www.npmjs.com/package/strapi-plugin-magic-sessionmanager)
|
|
11
15
|
[](https://github.com/Schero94/Magic-Sessionmanager/actions/workflows/test.yml)
|
|
12
|
-
[](LICENSE)
|
|
16
|
+
[](https://github.com/Schero94/Magic-Sessionmanager/blob/main/LICENSE)
|
|
13
17
|
|
|
14
|
-
Live docs: [https://schero94.github.io/Magic-Sessionmanager/](https://schero94.github.io/Magic-Sessionmanager/) · [npm](https://www.npmjs.com/package/strapi-plugin-magic-sessionmanager) · [Changelog](CHANGELOG.md) · [Report a bug](https://github.com/Schero94/Magic-Sessionmanager/issues/new/choose) · [Discussions](https://github.com/Schero94/Magic-Sessionmanager/discussions)
|
|
18
|
+
Live docs: [https://schero94.github.io/Magic-Sessionmanager/](https://schero94.github.io/Magic-Sessionmanager/) · [npm](https://www.npmjs.com/package/strapi-plugin-magic-sessionmanager) · [Changelog](https://github.com/Schero94/Magic-Sessionmanager/blob/main/CHANGELOG.md) · [Report a bug](https://github.com/Schero94/Magic-Sessionmanager/issues/new/choose) · [Discussions](https://github.com/Schero94/Magic-Sessionmanager/discussions)
|
|
15
19
|
|
|
16
|
-
, search, status filter and a table of sessions with state badges](https://schero94.github.io/Magic-Sessionmanager/img/dashboard.webp)
|
|
17
21
|
|
|
18
22
|
---
|
|
19
23
|
|
|
@@ -93,40 +97,35 @@ Yarn and pnpm work the same way (`yarn add strapi-plugin-magic-sessionmanager`,
|
|
|
93
97
|
|
|
94
98
|
## Screenshots
|
|
95
99
|
|
|
96
|
-
All screenshots use synthetic data: users `*.example.test`, IP addresses from the documentation range `203.0.113.0/24`, Strapi 5.61.
|
|
97
|
-
|
|
98
|
-
### Sessions dashboard in dark mode
|
|
99
|
-
|
|
100
|
-

|
|
100
|
+
All screenshots use synthetic data: users `*.example.test`, IP addresses from the documentation range `203.0.113.0/24`, Strapi 5.61. The [full gallery](https://schero94.github.io/Magic-Sessionmanager/#screenshots) on the project site also shows dark mode, every settings tab, the untracked sign-in dialogs and more mobile views.
|
|
101
101
|
|
|
102
102
|
### Session details
|
|
103
103
|
|
|
104
|
-

|
|
105
105
|
|
|
106
106
|
### Sessions panel in the Content Manager
|
|
107
107
|
|
|
108
|
-

|
|
109
109
|
|
|
110
110
|
### Homepage widget
|
|
111
111
|
|
|
112
|
-

|
|
113
113
|
|
|
114
114
|
### Configuration
|
|
115
115
|
|
|
116
|
-

|
|
116
|
+

|
|
119
117
|
|
|
120
118
|
### Analytics
|
|
121
119
|
|
|
122
|
-

|
|
121
|
+
|
|
122
|
+
### Untracked Strapi sign-ins (refresh mode)
|
|
123
|
+
|
|
124
|
+

|
|
123
125
|
|
|
124
126
|
### Mobile (390 px)
|
|
125
127
|
|
|
126
|
-
<
|
|
127
|
-
<img src="pics/mobile-dashboard.png" width="300" alt="Sessions dashboard at 390 px: the table becomes a card list with Details, End session and More buttons">
|
|
128
|
-
<img src="pics/mobile-session.png" width="300" alt="Session details dialog at 390 px in one column with Close and End session in the footer">
|
|
129
|
-
</p>
|
|
128
|
+
<img src="https://schero94.github.io/Magic-Sessionmanager/img/mobile-dashboard.webp" width="300" alt="Sessions dashboard at 390 px: the table becomes a card list with Details, End session and More buttons">
|
|
130
129
|
|
|
131
130
|
---
|
|
132
131
|
|
|
@@ -183,7 +182,7 @@ All screenshots use synthetic data: users `*.example.test`, IP addresses from th
|
|
|
183
182
|
- **Table:** Status (badge and a second line, for example "Ended manually · {date}"), User, Device, IP address, Signed in, Last active and the row actions **View details**, **End session** (disabled on ended rows) and **More actions › Delete record**. Clicking a row opens the details.
|
|
184
183
|
- Filters, search, page and page size are kept in the URL, so `?search=<email>` is a shareable link.
|
|
185
184
|
- Search, filters, sorting and paging run on the server, so the list, the counts and the page numbers cover every session, however many there are. Only the 25 to 100 rows on the screen are loaded.
|
|
186
|
-
- In `refresh` mode,
|
|
185
|
+
- In `refresh` mode, a notice above the cards counts **untracked Strapi sign-ins**: refresh tokens Strapi still accepts that have no session details from this plugin. They are not in the list and are not active or online sessions; each user's sessions panel lists them. The notice is neutral when all of them were created before this plugin started tracking, and a warning ("Possible tracking gap") when any was created afterwards. **Why?** opens a count-only summary; **End these sessions** ends them after a confirmation. See [Untracked Strapi sessions](#untracked-strapi-sessions).
|
|
187
186
|
- Below the large breakpoint the IP address and Signed in columns are hidden; below the medium breakpoint the table becomes a card list.
|
|
188
187
|
|
|
189
188
|
### Session details
|
|
@@ -232,7 +231,7 @@ Two links: **Configuration** and **Analytics**.
|
|
|
232
231
|
|
|
233
232
|
| Item | Supported |
|
|
234
233
|
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
235
|
-
| Strapi | 5 (`@strapi/strapi` peer range `^5.0.0`). Acceptance host: Strapi 5.
|
|
234
|
+
| Strapi | 5 (`@strapi/strapi` peer range `^5.0.0`). Acceptance host: Strapi 5.62.0. |
|
|
236
235
|
| Node.js | `^22.22.2 \|\| >=24.15.0` (`engines.node`) |
|
|
237
236
|
| Users & Permissions | `jwtManagement: 'refresh'` and `'legacy-support'` |
|
|
238
237
|
| Homepage widget | Strapi 5.13 and later (older versions have no widgets API; the rest works) |
|
|
@@ -286,6 +285,31 @@ Session Manager supports Users & Permissions end-user sessions in both the nativ
|
|
|
286
285
|
|
|
287
286
|
In this mode Strapi issues, rotates and revokes native sessions. Session Manager uses that state for end-user sessions and keeps its own metadata and history (device, IP address, location, security score). It does not issue or rotate a second token family. Rows created natively without a Session Manager record can appear with a `native_` ID; the admin marks them as "Strapi session", and their device, IP address and location are shown as "—" ("Not recorded").
|
|
288
287
|
|
|
288
|
+
### Untracked Strapi sessions
|
|
289
|
+
|
|
290
|
+
Strapi keeps its own session table (`admin::session`). The plugin links each Users & Permissions session it sees to a session record. A session without a record is **untracked**: its refresh token still works until it expires (Strapi defaults: 14 days idle, 30 days at most), but it is not in the dashboard list and never counts as active or online. The dashboard notice shows how many there are; the number counts unexpired refresh tokens, not people.
|
|
291
|
+
|
|
292
|
+
Which sign-ins are linked (tested with Strapi 5.61 on SQLite and PostgreSQL, `/api` and a custom `api.rest.prefix`):
|
|
293
|
+
|
|
294
|
+
| How the session is created | Linked |
|
|
295
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
296
|
+
| `POST /auth/local`, `/auth/local/register`, `GET /auth/:provider/callback`, `POST /auth/refresh` (the rotated session), `/auth/change-password`, `/auth/reset-password` | Yes, under any REST prefix |
|
|
297
|
+
| `GET /auth/email-confirmation` | Creates no session (redirects) |
|
|
298
|
+
| GraphQL `login`, `register`, `emailConfirmation` mutations | Yes |
|
|
299
|
+
| Custom routes or other plugins that call `strapi.sessionManager('users-permissions')` or the refresh-mode `jwt.issue()` and **return the token in the response** (`jwt`) | Yes, from the access token in the response |
|
|
300
|
+
| Code that **does not return the token** in the response that created it (token sent by email or another channel, stored server-side, created by a cron job or script) | **No.** The plugin cannot see which client holds it. It stays untracked. |
|
|
301
|
+
| Sessions created before this plugin started linking sessions | No; they expire on their own |
|
|
302
|
+
|
|
303
|
+
For the last two rows: return Strapi's `{ jwt, refreshToken }` (or the refresh cookie) from custom login code so the plugin can link it, or end untracked sessions from the dashboard.
|
|
304
|
+
|
|
305
|
+
**Reading the summary** (`GET /magic-sessionmanager/sessions/native-only/summary`, also behind **Why?**):
|
|
306
|
+
|
|
307
|
+
- `beforeTracking` / `afterTracking`: created before or after `trackingSince`, the date from which the plugin links sessions (stored once at startup as the login time of the oldest linked session, or the first start of this version). Only `beforeTracking` > 0: legacy rows, nothing to do; they disappear within the refresh-token lifetime. `afterTracking` > 0 and growing: a sign-in path the plugin does not see.
|
|
308
|
+
- `bySource`: `signIn` rows carry Strapi's sign-in details (local, register, provider callback, GraphQL login), `passwordChange` rows come from a password change or reset, `tokenOnly` rows from `jwt.issue()` or custom code. A growing `afterTracking` with `tokenOnly` points at custom code or another plugin; with `signIn`, at a login route on a path the plugin does not intercept that does not return the token.
|
|
309
|
+
- `byMonth`, `earlier`, `byDevice` (desktop, mobile, unknown, from Strapi's device label over at most 2,000 rows), `expiring.within7Days` / `within30Days`.
|
|
310
|
+
|
|
311
|
+
**Ending them** (`POST /magic-sessionmanager/sessions/native-only/end`, **End these sessions**) deletes untracked Users & Permissions rows from Strapi's session table, so their refresh tokens stop working; access tokens already issued run out within Strapi's access-token lifetime (10 minutes by default). Strapi administrator sessions, sessions listed in the plugin and sessions younger than two minutes are never touched. At most 5,000 per request; the response says how many remain.
|
|
312
|
+
|
|
289
313
|
### `legacy-support` mode
|
|
290
314
|
|
|
291
315
|
With `jwtManagement: 'legacy-support'`, Session Manager keeps its plugin-owned session behavior. It does not switch the host to refresh mode or migrate existing session records.
|
|
@@ -591,6 +615,8 @@ Prefix `/magic-sessionmanager` (Strapi admin API). Every route requires an authe
|
|
|
591
615
|
| GET | `/sessions` | Sessions dashboard: `?page=&pageSize=` (1-100), `status`, `reason`, `search`, `sort`; see below |
|
|
592
616
|
| GET | `/sessions/active` | Active sessions only; same paging parameters |
|
|
593
617
|
| GET | `/sessions/stats` | Dashboard cards and widget: counts only, cached 5 seconds per process |
|
|
618
|
+
| GET | `/sessions/native-only/summary` | **Why?** on the untracked-session notice: counts only, no query parameters (400 otherwise) |
|
|
619
|
+
| POST | `/sessions/native-only/end` | **End these sessions**: empty body; signed-in administrators only (admin API tokens get 403); 5 per minute |
|
|
594
620
|
| GET | `/sessions/analytics` | Analytics page: counts and grouped counts over every session, cached 30 seconds |
|
|
595
621
|
| GET | `/sessions/export` | Export batches of up to 1,000 rows, newest first; follow `meta.nextCursor` |
|
|
596
622
|
| GET | `/user/:userId/sessions` | Sessions panel |
|
|
@@ -609,7 +635,9 @@ Prefix `/magic-sessionmanager` (Strapi admin API). Every route requires an authe
|
|
|
609
635
|
|
|
610
636
|
**Session list parameters.** `page` (from 1), `pageSize` (1-100), `status` (`all`, `open`, `active`, `idle`, `ended`), `reason` (with `status=ended`: `logout`, `idle`, `expired`, `manual`, `blocked`, `unrecorded`), `search` (up to 100 characters; matches email, username, IP address, browser, operating system and device type) and `sort` (`loginTime:desc`, `loginTime:asc`, `lastActive:desc`, `lastActive:asc`). The response is `{ data, meta: { pagination: { page, pageSize, total, pageCount } } }` with exact totals. Unknown or out-of-range parameters return 400. Pages that start after the first 50,000 matching sessions return 400; narrow the filter or use the export, which walks every row with a cursor. Without `page` and `pageSize`, `GET /sessions` keeps the 4.x response (latest 1,000 rows, `meta.truncated`) for existing scripts.
|
|
611
637
|
|
|
612
|
-
|
|
638
|
+
Both untracked-session routes use the same `plugin::magic-sessionmanager.access` permission as **End session**; the plugin has no separate read-only permission. `POST /sessions/native-only/end` returns `{ data: { ended, remaining, limit } }` and writes one log line with the counts only, 409 while another clean-up runs.
|
|
639
|
+
|
|
640
|
+
The list, statistics, analytics, export, untracked-session summary and `/users/stats` routes share the read rate limit (120 requests per minute per admin, raise it with `rateLimitReadMax`).
|
|
613
641
|
|
|
614
642
|
**Block / unblock** (`toggle-block`): send `{ "blocked": true }` or `{ "blocked": false }`. This sets the state, is safe to retry and is what the admin UI sends. A request without a body still toggles, but is deprecated, because a retry after a lost response can reverse the intended state. A non-boolean `blocked` returns 400. The response contains `blocked` and `mode` (`explicit` or `toggle`). Blocking ends all open sessions with the reason `blocked`; if that fails, the response is 500 and the request can be retried.
|
|
615
643
|
|
|
@@ -808,15 +836,16 @@ The plugin sits in the request path of every authenticated Content API call, so
|
|
|
808
836
|
|
|
809
837
|
## Troubleshooting
|
|
810
838
|
|
|
811
|
-
| Problem | Fix
|
|
812
|
-
| --------------------------------------------------------------------- |
|
|
813
|
-
| No Session Manager menu item | Check `config/plugins.ts`, run `npm run build`, restart, hard-refresh the browser. For non-Super-Admin roles, grant "Access the Session Manager plugin".
|
|
814
|
-
| No sessions appear | Only end-user sign-ins through Users & Permissions are recorded, not Strapi admin sign-ins. Check the Strapi log.
|
|
815
|
-
| Startup fails with `SESSION_ENCRYPTION_KEY is required in production` | Set the variable and restart.
|
|
816
|
-
| 401 on every request after a sign-in | Check the `X-Session-Terminated-Reason` header. With Strict token check, tokens without a session record are rejected.
|
|
817
|
-
| 429 on sign-in | Temporary IP lockout. Wait 15 minutes or raise `maxFailedLogins`. Behind a proxy, turn on Trust proxy headers so the lockout targets the real client. With `Retry-After: 1`: more sign-ins from one address were running at once than `maxFailedLogins`; retry after a second.
|
|
818
|
-
| Location is always "—" | IP location lookup is off, the provider is `disabled`, or `local-mmdb` has no database. See Configuration › Location data.
|
|
819
|
-
|
|
|
839
|
+
| Problem | Fix |
|
|
840
|
+
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
841
|
+
| No Session Manager menu item | Check `config/plugins.ts`, run `npm run build`, restart, hard-refresh the browser. For non-Super-Admin roles, grant "Access the Session Manager plugin". |
|
|
842
|
+
| No sessions appear | Only end-user sign-ins through Users & Permissions are recorded, not Strapi admin sign-ins. Check the Strapi log. |
|
|
843
|
+
| Startup fails with `SESSION_ENCRYPTION_KEY is required in production` | Set the variable and restart. |
|
|
844
|
+
| 401 on every request after a sign-in | Check the `X-Session-Terminated-Reason` header. With Strict token check, tokens without a session record are rejected. |
|
|
845
|
+
| 429 on sign-in | Temporary IP lockout. Wait 15 minutes or raise `maxFailedLogins`. Behind a proxy, turn on Trust proxy headers so the lockout targets the real client. With `Retry-After: 1`: more sign-ins from one address were running at once than `maxFailedLogins`; retry after a second. |
|
|
846
|
+
| Location is always "—" | IP location lookup is off, the provider is `disabled`, or `local-mmdb` has no database. See Configuration › Location data. |
|
|
847
|
+
| Notice "Strapi sign-ins are not tracked" | These are unexpired Strapi refresh tokens without session details, not online users. Open **Why?**: only "Before tracking" means legacy rows that expire on their own; a growing "After tracking" means a sign-in path that does not return its token. See [Untracked Strapi sessions](#untracked-strapi-sessions). |
|
|
848
|
+
| Numbers differ from 4.x | The widget and Analytics now count Active and Idle by the configured inactivity timeout; "Online now" is now "Active sessions". |
|
|
820
849
|
|
|
821
850
|
The plugin stores sessions in the `magic_sessions` table and revocations in its own revoked-token table.
|
|
822
851
|
|
|
@@ -910,9 +939,9 @@ Issues and pull requests are welcome.
|
|
|
910
939
|
|
|
911
940
|
Actively maintained for the Strapi 5 line. Releases are cut by semantic-release from `main` using Conventional Commits and published to npm with npm Trusted Publishing (GitHub OIDC). Dependabot proposes weekly dependency updates; patch and minor updates are merged only after lint, tests, both type checks, build and `verify` pass.
|
|
912
941
|
|
|
913
|
-
Dependency advisories: the
|
|
942
|
+
Dependency advisories (checked 2026-11-17, Strapi 5.62.0 dev baseline): `npm audit --omit=dev` on the plugin lockfile reports 5 high findings. All of them are one advisory in the Strapi 5 core dependency chain, picomatch [GHSA-fc5q-39xc-vjpf](https://github.com/advisories/GHSA-fc5q-39xc-vjpf) through `@strapi/utils` > `preferred-pm` > `find-yarn-workspace-root2` > `micromatch`. The plugin cannot fix findings in that chain; the forced npm fix would downgrade to Strapi 4, so it is not applied. They clear when Strapi ships an updated `@strapi/utils`.
|
|
914
943
|
|
|
915
|
-
Version 4.8.0 was published before its acceptance gates closed and has known defects that 4.9.0 fixed (see the [CHANGELOG](CHANGELOG.md)). Use 4.9.0 or later.
|
|
944
|
+
Version 4.8.0 was published before its acceptance gates closed and has known defects that 4.9.0 fixed (see the [CHANGELOG](https://github.com/Schero94/Magic-Sessionmanager/blob/main/CHANGELOG.md)). Use 4.9.0 or later.
|
|
916
945
|
|
|
917
946
|
Report bugs at https://github.com/Schero94/Magic-Sessionmanager/issues.
|
|
918
947
|
|
|
@@ -926,4 +955,4 @@ The admin interface is available in English, German (formal "Sie"), French, Span
|
|
|
926
955
|
|
|
927
956
|
## License
|
|
928
957
|
|
|
929
|
-
MIT License. Copyright © 2025 Schero D. See [LICENSE](
|
|
958
|
+
MIT License. Copyright © 2025 Schero D. See [LICENSE](https://github.com/Schero94/Magic-Sessionmanager/blob/main/LICENSE).
|
|
@@ -9,7 +9,7 @@ const styled = require("styled-components");
|
|
|
9
9
|
const designSystem = require("@strapi/design-system");
|
|
10
10
|
const icons = require("@strapi/icons");
|
|
11
11
|
const symbols = require("@strapi/icons/symbols");
|
|
12
|
-
const index = require("./index-
|
|
12
|
+
const index = require("./index-DyE1rLW0.js");
|
|
13
13
|
const SectionCard = require("./SectionCard-BlWv8CRt.js");
|
|
14
14
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
15
15
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
@@ -7,7 +7,7 @@ import styled from "styled-components";
|
|
|
7
7
|
import { Typography, Flex, LinkButton, Button, EmptyStateLayout, VisuallyHidden } from "@strapi/design-system";
|
|
8
8
|
import { ArrowClockwise, ChartBubble, User, Clock, Calendar } from "@strapi/icons";
|
|
9
9
|
import { EmptyDocuments } from "@strapi/icons/symbols";
|
|
10
|
-
import { J as normalizeDeviceType, u as useSessionFormatters, l as pluginId, m as logSafeAdminError, n as PersistentAlert, R as ReadableText, v as PageShell, w as StatGrid, x as StatCard, F as EqualGrid, b as getTranslation, K as getDeviceTypeMessage } from "./index-
|
|
10
|
+
import { J as normalizeDeviceType, u as useSessionFormatters, l as pluginId, m as logSafeAdminError, n as PersistentAlert, R as ReadableText, v as PageShell, w as StatGrid, x as StatCard, F as EqualGrid, b as getTranslation, K as getDeviceTypeMessage } from "./index-mCVi1j7e.mjs";
|
|
11
11
|
import { S as SectionCard } from "./SectionCard-D51bv4Hi.mjs";
|
|
12
12
|
const ANALYTICS_UNKNOWN_KEY = "unknown";
|
|
13
13
|
const VERSION_TOKEN = /^v?\d[\w.]*$/i;
|