Any examples of how to set up role-based authorization with Blazor WASM and ASP.NET Core API?

I keep running into walls trying to set up Okta with Blazor WASM and ASP.NET Core API. I just started with Okta and I am by no means an expert at identity. I’ve Googled for hours and I cannot find a comprehensive example of how to set this up. I have the authentication and the token validation working, but how do I add roles? I’ve tried mapping Groups to roles per the instructions in a 2-year old YouTube video by the dude with long gray hair, but that didn’t work. I thought Okta is supposed to make this easy!
Lost and frustrated. Please help.

let us know if the official Microsoft docs on this help

Thanks.
The problem I’m having now I’m not getting the “groups” claim in the payload. It doesn’t show up in the Token Preview. I understand I need to map groups to roles in ASP.NET identity. But I can’t get the claim.

If I can get the groups claim then I can take it from there.

@davewevans72 please change your filter from Starts with to Matches regex and set that to .* to get all groups.

Hi davewevans72, did you get the answer. Can you get claims from groups in Blazor?

Not really. But I followed the advice in this post:
https://devforum.okta.com/t/blazor-wasm-net-core-3-1-api-userinfo/11878/2

Basically, it intercepts the token at the API end, reaches out to the Okta API and gets the claims. Then adds those claims. I believe I saved the uid from Okta as the users oktaUserId. Something like that. That’s how I map the users in my db with the ones in Okta.
This works fine but it would be nice to have a more direct way of getting the claims.

Ok, Thanks. If I get something I let you know.