Refactoring reset and session tokens, currently broken.

This commit is contained in:
Leo Vasanko
2025-07-14 16:10:02 -06:00
parent 19bcddca30
commit 225d7b7542
11 changed files with 786 additions and 330 deletions
+1 -10
View File
@@ -30,15 +30,6 @@ export const useAuthStore = defineStore('auth', {
}, duration)
}
},
async validateStoredToken() {
try {
const response = await fetch('/auth/validate-token')
const result = await response.json()
return result.status === 'success'
} catch (error) {
return false
}
},
async setSessionCookie(sessionToken) {
const response = await fetch('/auth/set-session', {
method: 'POST',
@@ -84,7 +75,7 @@ export const useAuthStore = defineStore('auth', {
}
},
async loadUserInfo() {
const response = await fetch('/auth/user-info')
const response = await fetch('/auth/user-info', {method: 'POST'})
const result = await response.json()
if (result.error) throw new Error(`Server: ${result.error}`)