What are the advantages of using Token based authentication in Azure SQL DB? How to decide whether to choose this approach for DB connection from your application?
The token-based authentication method allows middle-tier services to obtain a token from Azure AD and use it to connect to Azure SQL Database. It also enables more sophisticated scenarios, including certificate-based authentication.
Token-based identity can be used to manage each user’s view in SQL Database, or to sign in to SQL Database as a specific customer in a multitenant database. It can also be used to apply row-level security on that session in SQL Database and retrieve only the relevant data for that session.
Tokens can be used to securely call protected web APIs.
In addition, Token-based authentication is a great tool to handle authentication for multiple users. It scales easily and provides security.
It is easily scalable, no need to store user login information on the server.
Another common use is with mobile applications.
Provides security, each request must contain the token and after the token expires user needs to login again.
Finally, it prevents attacks such as cross-site request forgery (CSRF, also known as session riding).
Read more here: Source link