TodoList icon indicating copy to clipboard operation
TodoList copied to clipboard

[Defect] Change how the user secrets are currently deployed.

Open amoraitis opened this issue 4 years ago • 3 comments

Describe the bug

To Reproduce

Currently, we run one command per secret, which is painful for developers who want to contribute to our project.

Support for social login providers
If you want to allow your users to login with their social accounts, e.g. Facebook, follow instructions below.

Facebook
1 - Follow this guide to generate AppID and AppSecret.

2 - Execute the following instructions from TodoList/TodoList.Web:

dotnet user-secrets set Authentication:Facebook:AppId <app-id>
dotnet user-secrets set Authentication:Facebook:AppSecret <app-secret>
Google
1 - Follow this guide to generate ClientID and ClientSecret.

2 - Execute the following instructions from TodoList/TodoList.Web:

dotnet user-secrets set Authentication:Google:ClientId <client-id>
dotnet user-secrets set Authentication:Google:ClientSecret <client-secret>
Microsoft
1 - Follow this guide to generate ClientID and ClientSecret.

2 - Execute the following instructions from TodoList/TodoList.Web:

dotnet user-secrets set Authentication:Microsoft:ClientId <client-id>
dotnet user-secrets set Authentication:Microsoft:ClientSecret <client-secret>
Twitter
1 - Follow this guide to generate App ID and AppSecret.

2 - Execute the following instructions from TodoList/TodoList.Web:

dotnet user-secrets set Authentication:Twitter:ConsumerKey <consumer-key>
dotnet user-secrets set Authentication:Twitter:ConsumerSecret <consumer-secret>

Expected behavior The user should only deploy a JSON containing the required USER_SECRETS Include SendGrid ApiKey to the new secrets.

Additional context Create a default JSON, containing the keys needed, with their values set to an empty string. Here are more information and a guide on how to implement that: https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-3.1&tabs=windows.

amoraitis avatar Mar 15 '20 10:03 amoraitis

Created a secrets.json template under the TodoList.Web directory and updated the readme file to reflect automatic importing. Also modified the readme to use nested numbering for bullet points.

Wasn't clear if this was the right direction to take let me know.

JoeyBobbles avatar Apr 27 '20 21:04 JoeyBobbles

Created a secrets.json template under the TodoList.Web directory and updated the readme file to reflect automatic importing. Also modified the readme to use nested numbering for bullet points.

Wasn't clear if this was the right direction to take let me know.

Yes, I wasn't so clear. I meant to have a class that will act as a wrapper for these secrets. Here is the section that describes exactly what we want to achieve here. https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-2.2&tabs=windows#map-secrets-to-a-poco-1

amoraitis avatar Apr 28 '20 07:04 amoraitis

Thanks I'll take another look.

JoeyBobbles avatar Apr 28 '20 07:04 JoeyBobbles