add discord and facebook signin & some basic privacy policy

This commit is contained in:
2023-12-28 11:27:45 +01:00
parent f5a321d821
commit 037ede2b9e
5 changed files with 218 additions and 4 deletions
+15 -3
View File
@@ -36,9 +36,21 @@ builder.Services.AddDefaultIdentity<ApplicationUser>(options => options.SignIn.R
builder.Services.AddAuthentication()
.AddGoogle(options =>
{
var googleAuthNSection = builder.Configuration.GetSection("Authentication:Google");
options.ClientId = googleAuthNSection["ClientId"];
options.ClientSecret = googleAuthNSection["ClientSecret"];
var section = builder.Configuration.GetSection("Authentication:Google");
options.ClientId = section["ClientId"];
options.ClientSecret = section["ClientSecret"];
})
.AddFacebook(options =>
{
var section = builder.Configuration.GetSection("Authentication:Facebook");
options.ClientId = section["ClientId"];
options.ClientSecret = section["ClientSecret"];
})
.AddDiscord(options =>
{
var section = builder.Configuration.GetSection("Authentication:Discord");
options.ClientId = section["ClientId"];
options.ClientSecret = section["ClientSecret"];
});
builder.Services.AddControllersWithViews().AddJsonOptions(options =>