@zauru-sdk/common 6.8.6 → 6.9.0
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 +11 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/oauthErrors.js +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/oauthErrors.d.ts +7 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/oauthErrors.ts +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [6.9.0](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/common@6.8.6...@zauru-sdk/common@6.9.0) (2026-10-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* reintentar login cuando el code OAuth de userinfo es 401 ([e32620b](https://github.com/intuitiva/zauru-typescript-sdk/commit/e32620be26ec19e1cbea1340f9a33ea7bbe48176))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [6.8.6](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/common@6.8.5...@zauru-sdk/common@6.8.6) (2026-10-07)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @zauru-sdk/common
|
package/dist/esm/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./common.js"), exports);
|
|
18
18
|
__exportStar(require("./gtZones.js"), exports);
|
|
19
|
+
__exportStar(require("./oauthErrors.js"), exports);
|
|
19
20
|
__exportStar(require("./rejectionPercentageAdjustment.js"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isOauthUserinfoUnauthorizedError = isOauthUserinfoUnauthorizedError;
|
|
4
|
+
/**
|
|
5
|
+
* OAuth webapps use the authorize `code` as Bearer against `/api/userinfo`.
|
|
6
|
+
* Cirio returns 401 when that code is missing from Redis (expired, reused
|
|
7
|
+
* URL with `?code=`, or never issued). Nested `handlePossibleAxiosErrors`
|
|
8
|
+
* wraps the message; match status + path, not the exact prefix.
|
|
9
|
+
*/
|
|
10
|
+
function isOauthUserinfoUnauthorizedError(message) {
|
|
11
|
+
if (!message)
|
|
12
|
+
return false;
|
|
13
|
+
return /HTTP\s*401/i.test(message) && /\/api\/userinfo/i.test(message);
|
|
14
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth webapps use the authorize `code` as Bearer against `/api/userinfo`.
|
|
3
|
+
* Cirio returns 401 when that code is missing from Redis (expired, reused
|
|
4
|
+
* URL with `?code=`, or never issued). Nested `handlePossibleAxiosErrors`
|
|
5
|
+
* wraps the message; match status + path, not the exact prefix.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isOauthUserinfoUnauthorizedError(message?: string | null): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0",
|
|
4
4
|
"description": "Funciones de uso común en el desarrollo de webapps en Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"moment": "^2.30.1",
|
|
26
26
|
"moment-timezone": "^0.5.45"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "a46ebe234551d76d6a0ea9095be6e55540006ab3"
|
|
29
29
|
}
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth webapps use the authorize `code` as Bearer against `/api/userinfo`.
|
|
3
|
+
* Cirio returns 401 when that code is missing from Redis (expired, reused
|
|
4
|
+
* URL with `?code=`, or never issued). Nested `handlePossibleAxiosErrors`
|
|
5
|
+
* wraps the message; match status + path, not the exact prefix.
|
|
6
|
+
*/
|
|
7
|
+
export function isOauthUserinfoUnauthorizedError(
|
|
8
|
+
message?: string | null,
|
|
9
|
+
): boolean {
|
|
10
|
+
if (!message) return false;
|
|
11
|
+
return /HTTP\s*401/i.test(message) && /\/api\/userinfo/i.test(message);
|
|
12
|
+
}
|