Refactoring reset and session tokens, currently broken.

This commit is contained in:
2025-07-15 04:10:02 +00:00
parent 158115f172
commit 6a2c6f7ed0
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}`)