update BF
This commit is contained in:
@@ -3,9 +3,7 @@ import { ref, onMounted } from 'vue'
|
||||
import { useKeycloak } from "~/composables/useKeycloack"
|
||||
|
||||
const error = ref<string | null>(null)
|
||||
const { initKeycloak, isAuthenticated, getResponse, loginSSO } = useKeycloak()
|
||||
const profile = ref<any>(null)
|
||||
const token = ref<string | null>(null);
|
||||
const { initKeycloak, isAuthenticated, getResponse } = useKeycloak()
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
@@ -15,7 +13,7 @@ onMounted(async () => {
|
||||
if (isAuthenticated.value) {
|
||||
await getResponse()
|
||||
} else {
|
||||
await loginSSO({ redirectUri: '/auth/sso' })
|
||||
return navigateTo('/auth/login')
|
||||
}
|
||||
} catch (err: any) {
|
||||
error.value = err?.message || String(err)
|
||||
|
||||
Reference in New Issue
Block a user