Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I am building a client to an external API which is protected by OAuth2 (using access_tokens and refresh_tokens).
In order to prevent logging in every time, I need to store the obtained access_token and refresh_token somewhere in between runs.
dotnet user-secrets works well for reading development secrets, but it is not well suited to invoke from C# (for the usecase of saving a token upon login, or for the usecase of saving new tokens after using the refresh_token: there is no Nuget package for it, so you would need to make a Process.Run call.
Describe the solution you'd like
I would like the core of dotnet user-secrets to be packaged as nuget package, so that I could update secrets from my code easily without having to write a wrapper around the CLI tool.
Alternative which I would not like is writing a wrapper around Process.Run.
Another alternative is doing a File.WriteAllText() / File.ReadAllText() on serialized OAuth2-tokens myself.
I also found the work in progress on dotnet user-jwts / #41956, but I believe that tool has a different purpose.
Additional context
I am building an Uno Platform project so I am looking for something that is cross platform.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I am building a client to an external API which is protected by OAuth2 (using
access_tokens andrefresh_tokens).In order to prevent logging in every time, I need to store the obtained
access_tokenandrefresh_tokensomewhere in between runs.dotnet user-secretsworks well for reading development secrets, but it is not well suited to invoke from C# (for the usecase of saving a token upon login, or for the usecase of saving new tokens after using therefresh_token: there is no Nuget package for it, so you would need to make aProcess.Runcall.Describe the solution you'd like
I would like the core of
dotnet user-secretsto be packaged as nuget package, so that I could update secrets from my code easily without having to write a wrapper around the CLI tool.Alternative which I would not like is writing a wrapper around
Process.Run.Another alternative is doing a
File.WriteAllText()/File.ReadAllText()on serialized OAuth2-tokens myself.I also found the work in progress on
dotnet user-jwts/ #41956, but I believe that tool has a different purpose.Additional context
I am building an Uno Platform project so I am looking for something that is cross platform.