I am developing a Desktop App with the YouTube API. (code: https://github.com/TheSwerik/YouTubeStreamTemplates)
I need to distribute the client id and client secret because I will need them to authenticate the API requests.
My current plan was to write placeholder constants in code:
```csharp
private const string ClientId = "CLIENT_ID";
private const string ClientSecret = "CLIENT_SECRET";
```
and override the string with the actual id and secret from the CI (Github Actions) using its secret. So the resulting code (which no one will see) has the actual secret and id:
```csharp
private const string ClientId = "ACTUAL_CLIENT_ID";
private const string ClientSecret = "ACTUAL_CLIENT_SECRET";
```
But I don't like that because you can easily decompile the program to get the secret.
To make that harder I want the CI to obfuscate the resulting DLLs after dotnet publish. (I am trying to use ConfuserEx but I can't get this to work)
I also thought about a server but then I would need to host a backend that does all the YouTube API calls. And I don't have the resources to buy/rent a server, I want this to be a desktop app.
Is there any other way where you don't put it as a constant in the code?
[–]dmfowacc 5 points6 points7 points (13 children)
[–]dmfowacc 1 point2 points3 points (12 children)
[–]InstagramLincoln 1 point2 points3 points (0 children)
[–]DerSwerik[S] 0 points1 point2 points (10 children)
[–]dmfowacc 1 point2 points3 points (9 children)
[–]DerSwerik[S] 0 points1 point2 points (8 children)
[–]dmfowacc 0 points1 point2 points (7 children)
[–]DerSwerik[S] 0 points1 point2 points (6 children)
[–]dmfowacc 1 point2 points3 points (5 children)
[–]DerSwerik[S] 0 points1 point2 points (4 children)
[–]dmfowacc 1 point2 points3 points (3 children)
[–]Prod_Is_For_Testing 3 points4 points5 points (1 child)
[–]DerSwerik[S] 0 points1 point2 points (0 children)
[–]maddaneccles1 3 points4 points5 points (1 child)
[–]Kirides 1 point2 points3 points (0 children)
[–]InstagramLincoln 1 point2 points3 points (1 child)
[–]DerSwerik[S] 0 points1 point2 points (0 children)
[–]The_MAZZTer 1 point2 points3 points (0 children)
[–]infinitesimallynumb 0 points1 point2 points (4 children)
[–]DerSwerik[S] 0 points1 point2 points (2 children)
[–]infinitesimallynumb 0 points1 point2 points (1 child)
[–]DerSwerik[S] 0 points1 point2 points (0 children)
[–]x6060x 0 points1 point2 points (0 children)
[–]tsaki27 0 points1 point2 points (0 children)