Am working on a project using angular 9 as my client side, .net core 3.1 for API, and Identity server 4 for Authentication and authorization. On the client-side level, I can sign in using oidc for authentication and retrieving access tokens using implicit flow grand type. But whenever I try accessing the API endpoint after all necessary configurations without the authorization attributes on my controller I can access the data via the API endpoint, but whenever I add the authorization attribute on the controller I get a 404 HTTP error. What could possibly have gone wrong? Below is the snapshot of my code implementations and errors:
After going through some research i found ou that I failed to add identity server default authentication scheme and default challenge scheme on the authentication pipeline on the API startup.cs level.