Skip to content

Commit

Permalink
fix(auth): let implementing application handle route changes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Mar 14, 2024
1 parent f89a108 commit 0a38d52
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/stores/auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Composables
import { useRouter } from 'vue-router'

// Utilities
import { defineStore } from 'pinia'
import { computed, ref, shallowRef, watch } from 'vue'
Expand Down Expand Up @@ -41,7 +38,6 @@ export const useAuthStore = defineStore('auth', () => {
const user = ref<User | null>(null)
const http = useHttpStore()
const userStore = useUserStore()
const router = useRouter()
const isLoading = shallowRef(false)

const isSubscriber = computed(() => (
Expand Down Expand Up @@ -139,7 +135,6 @@ export const useAuthStore = defineStore('auth', () => {
localStorage.setItem('vuetify@lastLoginProvider', provider)
}
user.value = e.data.body.user
router.push('/user/dashboard/')
sync()
} else {
console.error(e.data.message)
Expand Down Expand Up @@ -184,7 +179,6 @@ export const useAuthStore = defineStore('auth', () => {
} catch (err: any) {
console.error(err)
} finally {
router.push('/')
isLoading.value = false
}
}
Expand Down

0 comments on commit 0a38d52

Please sign in to comment.