I am using keycloak.loing() method to login when the user is not authenticated and the init of vueKeycloak() works fine. But I just can't use keycloak.login() in any position (e.g. App.vue, RouteGuard...).
version: latest 2.5.0
index.ts:31 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'login')
at keycloakLogin (index.ts:31:17)
at call (call.mjs:4:17)
at handleClick2 (Button.mjs:141:22)
at callWithErrorHandling (runtime-core.esm-bundler.js:193:18)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:201:17)
at HTMLButtonElement.invoker (runtime-dom.esm-bundler.js:681:5)
I am using
keycloak.loing()
method to login when the user is not authenticated and the init ofvueKeycloak()
works fine. But I just can't usekeycloak.login()
in any position (e.g.App.vue
,RouteGuard
...).version: latest 2.5.0