Skip to content

Instantly share code, notes, and snippets.

Created Oct 10, 2019
What would you like to do?
vue-spring-keycloak-front - check auth vue
if (Vue.prototype.$keycloak.token !== null) {
this.authenticated = true;
this.user.username = Vue.prototype.$keycloak.userName;
this.user.role = Vue.prototype.$keycloak.tokenParsed.realm_access.roles[0]; = Vue.prototype.$;
} else {
console.log('Not logged');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment