@inflector/aura 0.1.18 → 0.1.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/dist/auth.js +4 -4
- package/package.json +1 -1
package/dist/auth.js
CHANGED
|
@@ -59,11 +59,11 @@ export const AuraAuth = (url, workspace) => {
|
|
|
59
59
|
});
|
|
60
60
|
// Refresh session when token changes (e.g. from another tab)
|
|
61
61
|
if (typeof window !== 'undefined') {
|
|
62
|
-
const unsub = authTokenVersion.subscribe(() => {
|
|
63
|
-
|
|
62
|
+
const unsub = authTokenVersion.subscribe((v) => {
|
|
63
|
+
if (v > 0) {
|
|
64
|
+
authClient.getSession().catch(() => { });
|
|
65
|
+
}
|
|
64
66
|
});
|
|
65
|
-
// Note: we're not unsubscribing here as AuraAuth is likely initialized once.
|
|
66
|
-
// If AuraAuth can be destroyed, we'd need to handle cleanup.
|
|
67
67
|
}
|
|
68
68
|
const Session = computed(authClient.useSession, (session) => {
|
|
69
69
|
if (!session?.data?.user)
|