Building a fulling functional sample code got Asp.net core 6 with OAuth2 and openID Connect.
Follow my notion page https://harrishs.notion.site/Walkthrough-of-Authentication-and-Authorization-with-OAuth2-and-OIDC-ba448f2c959543b68ece5bd87c0d809b?pvs=4 on instrucitng to build an IDP and secure the API using OAUTH2