Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
amoraitis opened this issue Mar 15, 2020 · 3 comments · May be fixed by #73
Open

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

amoraitis opened this issue Mar 15, 2020 · 3 comments · May be fixed by #73
Labels

Comments

@amoraitis
Copy link
Owner

amoraitis commented Mar 15, 2020

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.

@JoeyBobbles
Copy link

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.

@amoraitis
Copy link
Owner Author

amoraitis commented Apr 28, 2020

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

@JoeyBobbles
Copy link

Thanks I'll take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants