feat: add Vue.js frontend with JWT auth, Pinia store, and Docker
This commit is contained in:
19
src/composables/useAuth.js
Normal file
19
src/composables/useAuth.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
|
||||
export function useAuth() {
|
||||
const authStore = useAuthStore()
|
||||
|
||||
return {
|
||||
user: authStore.user,
|
||||
isAuthenticated: authStore.isAuthenticated,
|
||||
error: authStore.error,
|
||||
loading: authStore.loading,
|
||||
signup: authStore.signup,
|
||||
login: authStore.login,
|
||||
logout: authStore.logout,
|
||||
requestPasswordReset: authStore.requestPasswordReset,
|
||||
resetPassword: authStore.resetPassword,
|
||||
fetchProfile: authStore.fetchProfile,
|
||||
updateProfile: authStore.updateProfile,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user