Hi all, i am using “@auth0/auth0-vue”: “^1.0.1”, and I am looking for a good way to get get the user roles. In my vue2 project I used the auth0-spa-js and I added this function to a wrapper
isUserRole (role) {
const user = this.$auth.user
const roles = user ? user[‘http://domain.com/roles’] :
if (user && roles) {
return role === roles[0]
}
return false
}
then I would call it like this as a computed property
isAdmin() {
return this.$auth.isUserRole("Admin");
},
Is there a similar way to do this with the new auth0-vue sdk?