@nitra/vite-boot 5.0.8 → 5.0.9
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/package.json +1 -1
- package/src/user.js +4 -3
package/package.json
CHANGED
package/src/user.js
CHANGED
|
@@ -43,15 +43,16 @@ function intersection(a, b) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Очищаємо токен та дані користувача, переводимо його у стан "анонімний".
|
|
47
47
|
*/
|
|
48
48
|
export async function cleanToken() {
|
|
49
|
-
|
|
49
|
+
// очищуємо дані користувача
|
|
50
50
|
unsetUser()
|
|
51
51
|
|
|
52
|
-
// видаляємо з localStorage
|
|
52
|
+
// видаляємо запис з localStorage
|
|
53
53
|
localStorage.removeItem('__session')
|
|
54
54
|
|
|
55
|
+
// видаляємо cookie (__session) через Cookie Store API або document.cookie (fallback).
|
|
55
56
|
if (globalThis.cookieStore && typeof globalThis.cookieStore.delete === 'function') {
|
|
56
57
|
let safeDomain = import.meta.env.VITE_DOMAIN
|
|
57
58
|
|