Skip to content

Commit

Permalink
refactor(auth): no significant change
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Mar 9, 2024
1 parent d7a1024 commit 41fbc4c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/runtime/composables/useDirectusAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,8 @@ export function useDirectusAuth<DirectusSchema extends object> () {

async function fetchUser () {
const fields = config.auth.userFields ?? ['*']
try {
// @ts-ignore
user.value = await useDirectusRest(readMe({ fields }))
} catch (error) {
user.value = null
}
// @ts-ignore
user.value = await useDirectusRest(readMe({ fields })).catch(() => null)
}

function loginWithProvider (provider: string) {
Expand Down

0 comments on commit 41fbc4c

Please sign in to comment.