react-session.manager.sk 4.0.1 → 4.0.5
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 +19 -1
- package/package.json +1 -7
package/README.md
CHANGED
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
# react-session.manager.sk
|
|
2
2
|
|
|
3
3
|
[](https://github.com/Skulldorom/react-session.manager.sk/actions/workflows/tests.yml)
|
|
4
|
-
[](https://github.com/Skulldorom/react-session.manager.sk/actions/workflows/npm-publish.yml)
|
|
5
5
|
[](https://github.com/Skulldorom/react-session.manager.sk/releases)
|
|
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)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-session.manager.sk",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "A react component used to manage token sessions with flask backend",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -16,12 +16,6 @@
|
|
|
16
16
|
"lint": "eslint src/**/*.{js,jsx}",
|
|
17
17
|
"lint:fix": "eslint src/**/*.{js,jsx} --fix",
|
|
18
18
|
"format": "prettier --write src/**/*.{js,jsx,css}",
|
|
19
|
-
"version:patch": "npm version patch",
|
|
20
|
-
"version:minor": "npm version minor",
|
|
21
|
-
"version:major": "npm version major",
|
|
22
|
-
"release:patch": "npm run version:patch && git push --follow-tags",
|
|
23
|
-
"release:minor": "npm run version:minor && git push --follow-tags",
|
|
24
|
-
"release:major": "npm run version:major && git push --follow-tags",
|
|
25
19
|
"preversion": "npm run lint && npm run test:general && npm run build && npm run test:smoke && npm run test:consumer-smoke",
|
|
26
20
|
"postversion": "node -e \"console.log('Version updated to ' + require('./package.json').version)\""
|
|
27
21
|
},
|