You also need to call app.UseAuthorization(); in addition to adding this policy. You need to add custom attribute Role to your User object. Have you done that?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You also need to call
app.UseAuthorization();
in addition to adding this policy. You need to add custom attributeRole
to your User object. Have you done that?