Hi @Jordan Nash ,
So my question is do the property names (not the values) match up with what you are seeing in appsettings.json snippet or have I set the property names incorrectly in my user-secrets store?
In the appsettings.json file, if contains the following value:
In the Startup.cs file, we use the following code to get the ClientId and ClientSecret from the appsettings.json:
var clientid = Configuration["AccessTokenManagement:Clients:0:ClientId"];
var Audience = Configuration["AccessTokenManagement:Clients:0:Audience"];
The result as below:
Then, to store the above value in the user secrets with the same property name, we could use the following code:
dotnet user-secrets set "AccessTokenManagement:Clients:0:ClientId" "auth0 clientid"
dotnet user-secrets set "AccessTokenManagement:Clients:0:ClientSecret" "auth0 secret"
After that, we can see the secret.json file as below:
Then, we can get the secret using the following code:
var domin = Configuration["AccessTokenManagement:Clients:0:ClientId"];
var clientidd = Configuration["AccessTokenManagement:Clients:0:ClientSecret"];
the result:
[Note] If using the same property name in appsettings.json and secret.json file, when we get the value, it will return the value from user secrets store.
If I misunderstand your question, please let me know freely.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion