Being a bit new to ASP and React, I am using a VS generated React JS app with Identity Login;
However when I use react fetch to run the API to Get (bearer token is valid) with below Authorize
[Authorize(Roles = SuperAdmin)]
The fetch call returns FORBIDDEN and on server side the below error "Uncaught SyntaxError SyntaxError: Unexpected end of JSON
However changing Authorize attribute to [Authorize] works fine!!!
I want to use role based authorization on controller.... what am I missing??