Sdk Vuejs user groups

Hi Guys,

I want to add some functionality in my vue GUI based on user groups/roles.
does someone know the link to the $auth api/user properties that can be used?

regards

Hi @derikvlog,

Not sure if you’re already using our okta-vue library, but you can do this today by using the $auth.getUser method. Once called, it will return a set of claims associated with that user, where you can then make a component rendering decision.

Hi @jmelberg

$auth,getUser is great. By adding the users groups as a claim to the ID_token I can have some simple authorization in my front end Vue app. But I’m not able to get the Group Roles into a claim. Is this possible?

For example I would like to check if a user is Group Administrator “USER_ADMIN” in a specific group and then show the edit link if true. Is this possible?

@hjalmar,

You can add custom or extend returned claims in access and/or identity tokens by following the steps outlined here.

Hope this helps!