fix: simplify OpenIddict server configuration

- Remove non-existent method calls (AllowAuthorizationCodeFlow, etc)
- Keep only basic configuration: issuer, encryption, scopes
- This should fix 'authorization endpoint must be enabled' error
This commit is contained in:
Sam 2026-02-06 21:59:06 +08:00
parent 875ba7bc61
commit 1a0c18c198

View File

@ -25,15 +25,10 @@ public static class OpenIddictSetup
builder.AddServer(options =>
{
options.SetIssuer(configuration["OpenIddict:Issuer"] ?? "https://auth.fengling.local");
options.AddDevelopmentEncryptionCertificate()
.AddDevelopmentSigningCertificate();
options.AllowAuthorizationCodeFlow()
.AllowPasswordFlow()
.AllowRefreshTokenFlow()
.RequireProofKeyForCodeExchange();
options.RegisterScopes(
"openid",
"profile",