Okta Angular routing restrictions

Hi,

I am playing with Okta for authentication within an Angular SPA using @okta/okta-angular.

What I need to achieve is restricting access to routes based on Okta groups. I can access groups within the claims attribute of the id token via oktaAuth.getUser() but what is the best paradigm to achieve routing restrictions?

cheers
Martin

Currently I am doing this using a custom authguard passing in the required group and then checking against the users groups. It works but just feels like there might be a more efficient way…