I have a WEB API application with windows authentication, and I have an SPFX application in sharepoint 2019. Everything is on premise. How can I authenticate the api with the current sharepoint user?
If you’re using Windows Authentication (passing on the credentials of the user accessing the API on to SharePoint), then you will need to set up Kerberos authentication to allow the user’s credentials to flow through the Web API (known as double-hop).
NTLM authentication cannot do this.