20260717170047
This commit is contained in:
1 parent
49dafe524c
commit
35aa108a34
40 files changed
+6218
-413
No files matched your search
@@ -1,6 +1,13 @@
|
||||
import { computed, ref } from "vue";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
try {
|
||||
// Remove sessions persisted by earlier versions; authentication is session-only now.
|
||||
localStorage.removeItem("fms-auth");
|
||||
} catch {
|
||||
// Storage can be unavailable in restricted browser contexts.
|
||||
}
|
||||
|
||||
export const useAuthStore = defineStore(
|
||||
"auth",
|
||||
() => {
|
||||
@@ -33,6 +40,7 @@ export const useAuthStore = defineStore(
|
||||
{
|
||||
persist: {
|
||||
key: "fms-auth",
|
||||
storage: sessionStorage,
|
||||
pick: ["token", "orgId", "user"],
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user