Skip to content

Commit

Permalink
remove explicit store calls now implemented as events on the authservice
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfgebhardt committed Apr 16, 2024
1 parent 2f79a3d commit c5d8ac0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/menu/TopMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const auth = useAuthStore()
async function signOut() {
try {
await authService?.signOut()
auth.clear()
} catch (error) {
// eslint-disable-next-line no-console
console.log('auth error', error)
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/pages/silent-refresh/+Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ import { inject, onBeforeMount } from 'vue'
import DefaultLayout from '#layouts/DefaultLayout.vue'
import AuthService from '#src/services/AuthService'
import { useAuthStore } from '#stores/authStore.js'
const authService = inject<AuthService>('authService')
const auth = useAuthStore()
onBeforeMount(async () => {
try {
await authService?.renewToken()
auth.save((await authService?.getUser()) || null)
navigate('/')
} catch (error) {
// eslint-disable-next-line no-console
Expand Down
1 change: 0 additions & 1 deletion frontend/src/stores/authStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const cookieStorage = {
setItem(key: string, state: string) {
Cookies.set('auth', state, {
expires: 3,
SameSite: 'none',
Secure: true,
})
},
Expand Down

0 comments on commit c5d8ac0

Please sign in to comment.