react-session.manager.sk 4.0.1 → 4.0.2
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/README.md +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,23 @@
|
|
|
6
6
|
|
|
7
7
|
A React context provider for managing cookie-based user sessions in applications backed by a Flask API. It configures credentialed Axios requests, CSRF headers, device fingerprinting, app version enforcement, and user-facing toast notifications — all from a single wrapper component.
|
|
8
8
|
|
|
9
|
+
Designed to pair with the backend companion
|
|
10
|
+
[flask-session.manager.sk](https://github.com/Skulldorom/flask-session.manager.sk).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Flask Companion Contract
|
|
15
|
+
|
|
16
|
+
This package and [flask-session.manager.sk](https://github.com/Skulldorom/flask-session.manager.sk) implement a cookie-driven session architecture:
|
|
17
|
+
|
|
18
|
+
| Concern | Implementation |
|
|
19
|
+
|---|---|
|
|
20
|
+
| **Transport** | HttpOnly JWT cookies — no bearer tokens in browser storage |
|
|
21
|
+
| **CSRF** | Double-submit cookie pattern (`csrf_access_token` → `X-CSRF-TOKEN`) |
|
|
22
|
+
| **Cookie names** | Flask-JWT-Extended defaults (`access_token_cookie`, `csrf_access_token`) |
|
|
23
|
+
| **Headers** | `deviceUID` and `appVersion` sent on every request |
|
|
24
|
+
| **API contract** | `userLoader` expects `{ data: { logged_in, is_admin, Info } }` |
|
|
25
|
+
|
|
9
26
|
---
|
|
10
27
|
|
|
11
28
|
## Table of Contents
|
|
@@ -13,6 +30,7 @@ A React context provider for managing cookie-based user sessions in applications
|
|
|
13
30
|
- [Features](#features)
|
|
14
31
|
- [Installation](#installation)
|
|
15
32
|
- [Quick Start](#quick-start)
|
|
33
|
+
- [Flask Companion Contract](#flask-companion-contract)
|
|
16
34
|
- [Props](#props)
|
|
17
35
|
- [Context API](#context-api)
|
|
18
36
|
- [How It Works](#how-it-works)
|