To prevent users from having to log in after every deployment, we need to store Data Protection keys in SQL Server.
We will follow the guidance from this documentation, and the best approach for us is to create a dedicated DbContext for managing these keys.
For production, we can leverage the existing environment variable EconoFlow_THUMBPRINT to encrypt the keys stored in the database. Ensure that encryption is only applied in the production environment by checking app.Environment.IsDevelopment().
Additionally, make sure Cypress tests continue to run smoothly after this change, as they should not be disrupted by the new key storage approach.
To prevent users from having to log in after every deployment, we need to store Data Protection keys in SQL Server.
We will follow the guidance from this documentation, and the best approach for us is to create a dedicated DbContext for managing these keys.
For production, we can leverage the existing environment variable
EconoFlow_THUMBPRINT
to encrypt the keys stored in the database. Ensure that encryption is only applied in the production environment by checkingapp.Environment.IsDevelopment()
.Additionally, make sure Cypress tests continue to run smoothly after this change, as they should not be disrupted by the new key storage approach.