Even locally on your dev machine there’s options.
In .NET you can replace a setting in appsettings.json with a secret from the “user-secrets” store.
To add a secret to the user store, run the following command from the folder where appsettings.json resides:
dotnet user-secrets set "ThePath:ToTheSecret:InAppsettingsJson" "secretgoeshere"