🎨 Removed unused dependency injected services arguments in constructor

This commit is contained in:
2025-06-21 14:32:59 +08:00
parent eadf25f389
commit 1baa3109bc
12 changed files with 9 additions and 18 deletions

View File

@ -58,7 +58,7 @@ public class AuthService(AppDatabase db, IConfiguration config, IHttpClientFacto
// 4) Combine base “maxSteps” (the number of enabled factors) with any accumulated risk score.
const int totalRiskScore = 3;
var totalRequiredSteps = (int)Math.Round((float)maxSteps * riskScore / 3);
var totalRequiredSteps = (int)Math.Round((float)maxSteps * riskScore / totalRiskScore);
// Clamp the steps
totalRequiredSteps = Math.Max(Math.Min(totalRequiredSteps, maxSteps), 1);

View File

@ -304,7 +304,7 @@ public class ConnectionController(
{
await db.SaveChangesAsync();
}
catch (DbUpdateException ex)
catch (DbUpdateException)
{
return StatusCode(500, $"Failed to save {provider} connection. Please try again.");
}

View File

@ -33,15 +33,15 @@ public class DiscordOidcService(
return $"https://discord.com/api/oauth2/authorize?{queryString}";
}
protected override async Task<OidcDiscoveryDocument?> GetDiscoveryDocumentAsync()
protected override Task<OidcDiscoveryDocument?> GetDiscoveryDocumentAsync()
{
return new OidcDiscoveryDocument
return Task.FromResult(new OidcDiscoveryDocument
{
AuthorizationEndpoint = "https://discord.com/oauth2/authorize",
TokenEndpoint = "https://discord.com/api/oauth2/token",
UserinfoEndpoint = "https://discord.com/api/users/@me",
JwksUri = null
};
})!;
}
public override async Task<OidcUserInfo> ProcessCallbackAsync(OidcCallbackData callbackData)