Install Secret Manager tool to be able to store credentials.
Otherwise, create a new file ./src/GovITHub.Auth.Identity/appsettings.development.json
and add a section named Authentication
.
- Navigate to https://developers.facebook.com/apps and add new Facebook app
- Open the
Settings
tab and click onAdd new platform
- Select
Website
as the platform - In
Site URL
box puthttps://localhost:44301/
- Open shell
- Navigate to
./src/GovITHub.Auth.Identity/
- Execute the following commands:
dotnet user-secrets set Authentication:Facebook:AppId <app-Id>
dotnet user-secrets set Authentication:Facebook:AppSecret <app-secret>
Add Facebook
section to Authentication
section; the file should look like this:
{
"Authentication": {
"Facebook": {
"AppId": "<app-id>",
"AppSecret": "<app-secret>"
}
}
}
- Log in to https://console.developers.google.com and setup a new app
- On credentials edit form set Authorized redirect URIs to
http://localhost:5000/signin-google
- Open shell
- Navigate to
./src/GovITHub.Auth.Identity/
- Execute the following commands:
dotnet user-secrets set Authentication:Google:GoogleClientId <client-id>
dotnet user-secrets set Authentication:Google:GoogleClientSecret <client-secret>
Add Google
section to Authentication
section; the file should look like this:
{
"Authentication": {
"Google": {
"GoogleClientId": "<client-id>",
"GoogleClientSecret": "<client-secret>"
}
}
}
- Log in to https://developer.linkedin.com/
- From the navigation bar select My Apps and then click on
Create Application
- Fill in the required info and in Website URL box type
http://localhost:5000
- Press
Submit
and you will be redirected to the new application
- In the Authentication tab
- In Default application permissions section check
r_basicprofile
andr_emailaddress
- In OAuth 2.0 section add
http://localhost:5000/Account/ExternalLoginCallback
to the Authorized Redirect URLs
- In Default application permissions section check
- Open shell
- Navigate to
./src/GovITHub.Auth.Identity/
- Execute the following commands:
dotnet user-secrets set Authentication:LinkedIn:ClientId <client-id>
dotnet user-secrets set Authentication:LinkedIn:ClientSecret <client-secret>
Add LinkedIn
section to Authentication
section; the file should look like this:
{
"Authentication": {
"LinkedIn": {
"ClientId": "<client-id>",
"ClientSecret": "<client-secret>"
}
}
}