Replace GitHub SSO with Facebook SSO

Co-authored-by: edgeofsanity76 <79632647+edgeofsanity76@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]andedgeofsanity76 committed 2026-03-03 11:40:52 +00:00
1 parent 480e0479d7
commit 0ced368698
5 files changed
+10 -17

No files matched your search

+5 -13
View File
@@ -58,21 +58,13 @@ if (!string.IsNullOrEmpty(microsoftSection["ClientId"]) && !string.IsNullOrEmpty
});
}
var githubSection = builder.Configuration.GetSection("Authentication:GitHub");
if (!string.IsNullOrEmpty(githubSection["ClientId"]) && !string.IsNullOrEmpty(githubSection["ClientSecret"]))
var facebookSection = builder.Configuration.GetSection("Authentication:Facebook");
if (!string.IsNullOrEmpty(facebookSection["ClientId"]) && !string.IsNullOrEmpty(facebookSection["ClientSecret"]))
{
authBuilder.AddOAuth("GitHub", "GitHub", options =>
authBuilder.AddFacebook(options =>
{
options.ClientId = githubSection["ClientId"]!;
options.ClientSecret = githubSection["ClientSecret"]!;
options.AuthorizationEndpoint = "https://github.com/login/oauth/authorize";
options.TokenEndpoint = "https://github.com/login/oauth/access_token";
options.UserInformationEndpoint = "https://api.github.com/user";
options.CallbackPath = "/signin-github";
options.Scope.Add("user:email");
options.ClaimActions.MapJsonKey(System.Security.Claims.ClaimTypes.NameIdentifier, "id");
options.ClaimActions.MapJsonKey(System.Security.Claims.ClaimTypes.Name, "login");
options.ClaimActions.MapJsonKey(System.Security.Claims.ClaimTypes.Email, "email");
options.ClientId = facebookSection["ClientId"]!;
options.ClientSecret = facebookSection["ClientSecret"]!;
});
}