
Enterprise Application Development with C# 9 and .NET 5
By :

OAuth 2.0 is a modern and industry-standard protocol for securing web APIs. It simplifies the process by providing specific authorization flows for web apps, single-page apps, mobile apps, and so on, to access secured APIs.
Consider a use case where you want to build a web portal in which users can sync and view photos/videos from their favorite applications such as Instagram, Facebook, or other third-party applications. Your application should be able to request data from third-party applications on behalf of the user. One approach involves the storing of a user's credentials in relation to each third-party application, and your application sends or requests data on behalf of the user.
This approach can lead to many problems, outlined as follows: