feat(#9): Nuxt 4 migration
This commit is contained in:
19
legalconsenthub/app/pages/callback.vue
Normal file
19
legalconsenthub/app/pages/callback.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<h1>Authentication callback processing...</h1>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useKeycloak } from '~/composables/useKeycloak'
|
||||
|
||||
const { userManager } = useKeycloak()
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const user = await userManager.signinRedirectCallback()
|
||||
console.log('User logged in', user)
|
||||
await navigateTo('/')
|
||||
} catch (e) {
|
||||
console.error('Error during login', e)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user