@finema/finework-layer 0.2.17 → 0.2.19
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 +8 -0
- package/app/composables/useAuth.ts +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.19](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.18...0.2.19) (2025-10-20)
|
|
4
|
+
|
|
5
|
+
## [0.2.18](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.17...0.2.18) (2025-10-20)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **auth:** handle missing timestamp in cache expiration check ([90fe085](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/90fe08598b92e0c1f6f2e8da2db65c7397a8cf67))
|
|
10
|
+
|
|
3
11
|
## [0.2.17](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.16...0.2.17) (2025-10-20)
|
|
4
12
|
|
|
5
13
|
## [0.2.16](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.15...0.2.16) (2025-10-20)
|
|
@@ -81,12 +81,12 @@ export const useAuth = () => {
|
|
|
81
81
|
timestamp.value = t
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
const isShouldFetch =
|
|
85
|
-
if (!value.value) return true
|
|
84
|
+
const isShouldFetch = () => {
|
|
85
|
+
if (!value.value || !timestamp.value) return true
|
|
86
86
|
|
|
87
87
|
// expire after 1 min - fetch if timestamp is older than 1 minute ago
|
|
88
|
-
return
|
|
89
|
-
}
|
|
88
|
+
return Date.now() - timestamp.value > 1000 * 60 * 1
|
|
89
|
+
}
|
|
90
90
|
|
|
91
91
|
return {
|
|
92
92
|
value,
|