3👍
✅
You have to return a new Promise in the middleware, something like this:
export default function({ store, redirect }) {
if (keycloak.authenticated) return true
return new Promise((resolve, reject) => {
keycloak
.init({
onLoad: 'login-required',
checkLoginIframe: true,
checkLoginIframeInterval: 5
})
.success(resolve)
.error(reject)
})
}
👤jeam
Source:stackexchange.com