I need help with the right libraries to connect Sequelize to MSSQL database using Windows Authentication.
I have a requirement for a client where I cannot use passwords to connect to the database on the server. Their required method of use is to connect to MSSQL database using Windows Authentication.
The problem I have is that we are using Sequelize and the only Dialect using msnodesqlv8 (which supports Windows Authentication) that I was able to find is not maintained any more. https://www.npmjs.com/package/sequelize-msnodesqlv8
Tedious which is the default dialect for Sequelize does not support Windows Authentication without password. It has the option of using ntlm, but it also requires a password.
Update: https://www.npmjs.com/package/msnodesqlv8 supports windows authentication. There are some slight changes in the way they handle some data types like BigInt. Other than that, it works pretty well.
Though, I had already created a custom version of tedious driver with sspi-client https://www.npmjs.com/package/@sregger/sspi-client thanks to some legacy code samples and help from Tediousjs community. So I kept it. One word of caution is that if you are using sspi-client, Worker will not work. To use Worker, use custom library https://www.npmjs.com/package/shinobi-worker otherwise you will get the error of "Module did not self-register"