prividium 0.3.0 → 0.3.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/README.md +1 -1
- package/dist/sdk/prividium-chain.js +4 -0
- package/dist/sdk/types.d.ts +1 -1
- package/dist/sdk/types.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -446,7 +446,7 @@ if (headers) {
|
|
|
446
446
|
|
|
447
447
|
The SDK uses the following localStorage keys:
|
|
448
448
|
|
|
449
|
-
- `
|
|
449
|
+
- `prividium_token_<chainId>` - Token storage
|
|
450
450
|
- `prividium_auth_state_<chainId>` - OAuth state parameter
|
|
451
451
|
|
|
452
452
|
## Security Considerations
|
|
@@ -67,6 +67,10 @@ export function createPrividiumChain(config) {
|
|
|
67
67
|
headers: getAuthHeaders() || {}
|
|
68
68
|
},
|
|
69
69
|
onFetchRequest(_request, init) {
|
|
70
|
+
const isAuthenticated = tokenManager.isAuthorized();
|
|
71
|
+
if (!isAuthenticated) {
|
|
72
|
+
throw new PrividiumSessionError();
|
|
73
|
+
}
|
|
70
74
|
init.headers = {
|
|
71
75
|
...init.headers,
|
|
72
76
|
...getAuthHeaders()
|
package/dist/sdk/types.d.ts
CHANGED
package/dist/sdk/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prividium",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"bin": {
|
|
5
5
|
"prividium": "bin/cli.js"
|
|
6
6
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@fastify/static": "^8.3.0",
|
|
34
34
|
"appdirsjs": "^1.2.7",
|
|
35
35
|
"date-fns": "^4.1.0",
|
|
36
|
-
"fastify": "^5.7.
|
|
36
|
+
"fastify": "^5.7.2",
|
|
37
37
|
"fastify-type-provider-zod": "^6.1.0",
|
|
38
38
|
"kleur": "^4.1.5",
|
|
39
39
|
"open": "^10.1.0",
|