If youre building a web API, its likely that your users will need to access the API from multiple devices and browsers. It would be inconvenient if they had to log in every time! Instead, you can use single sign on (SSO) so that once a user logs into your app or website, they dont have to log in again when accessing the API. This is especially important for mobile apps because logging out of an app often requires deleting it from your phone entirelya big hassle!
The most popular way to do this is by using OAuth2 with OpenID Connect (OIDC)
https://t.co/XQ0WUhqaaX