I'm playing with Identity Server v4 (but I thinks is the same with v3) and .NET Core.
Right now I've strange issue that I don't understand.
From my MVC application I use the [Authorize(Roles="Geek")] to protect my controllers/actions. Looking the current User from the HttpContext all the Roles are available as Claims and not as Roles (in fact User.IsInRole("Geek") return false).
Moreover I can't use the Claims with the authorize attribute because all role are stored into the claims collection with the same key ("role" of course).
Is there a way to have automatically all the claims with the key "role" also as role for the current principal?
I tried to play with "on token validate event" but without success.
I'm trying the sample repo, so my code is pretty the same of this https://github.com/IdentityServer/IdentityServer4.Samples/tree/dev/MVC%20and%20API
Any hint?