-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hello,
I have problem when I implement vueKeycloak to my Vue 3 project.
I implement basic config options (options does work in keycloak-js library) and on page load after few seconds I get error in console
Uncaught (in promise) Error: Could not read access token
at initKeycloak (index.esm.js?08aa:98)
at async Object.install (index.esm.js?08aa:156)
this is where i get this error:
async function initKeycloak(initConfig) {
try {
isPending(true);
const _isAuthenticated = await $keycloak.init(initConfig);
isAuthenticated(_isAuthenticated);
if (!isNil($keycloak.token)) {
setToken($keycloak.token);
}
$keycloak.onAuthRefreshSuccess = () => setToken($keycloak.token);
$keycloak.onTokenExpired = () => updateToken();
}
catch (error) {
hasFailed(true);
isAuthenticated(false);
throw new Error('Could not read access token');
}
finally {
isPending(false);
}
}
Do you have any idea why do I have this error?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status