Version 1.0 #102
@@ -4,9 +4,8 @@ import { useAPIStore } from './api'
|
|||||||
|
|
||||||
export const useAuthStore = defineStore('auth', () => {
|
export const useAuthStore = defineStore('auth', () => {
|
||||||
|
|
||||||
// Token timeout constants (in milliseconds)
|
const DEFAULT_TIMEOUT = 5 * 60 * 1000
|
||||||
const DEFAULT_TIMEOUT = 5 * 60 * 1000 // 5 minutes
|
const REMEMBER_ME_TIMEOUT = 365 * 24 * 60 * 60 * 1000
|
||||||
const REMEMBER_ME_TIMEOUT = 365 * 24 * 60 * 60 * 1000 // 1 year
|
|
||||||
|
|
||||||
const currentUser = ref(undefined)
|
const currentUser = ref(undefined)
|
||||||
const token = ref(localStorage.getItem('token') || null)
|
const token = ref(localStorage.getItem('token') || null)
|
||||||
|
|||||||
Reference in New Issue
Block a user