- Exception message and full stack trace:
- Steps to reproduce the issue:
I'm experiencing an error with the AuthServer service. When I run it in the local environment, everything works fine. However, when I deploy it to the production environment, after logging into the system, I encounter an error where I can't get the token bearer and client redirect to login page. The error log is as follows:
In the DBRAuthServerModule, my code is:
I don't know why this error occurs. I have checked the configurations in the OpeniddictApplications table and scope. Everything seems correct.
2 Answer(s)
-
0
Hi, the
code_verifier
parameter is used to have an additional layer of security with PKCE.In the production mode, you should generate
ProductionEncryptionAndSigningCertificate
and it seems you are already doing that, but can you please confirm thexxxx
part (password of the certificate) is a real value, and it matches with the password value in your configuration:public override void PreConfigureServices(ServiceConfigurationContext context) { var hostingEnvironment = context.Services.GetHostingEnvironment(); if (!hostingEnvironment.IsDevelopment()) { PreConfigure<AbpOpenIddictAspNetCoreOptions>(options => { options.AddDevelopmentEncryptionAndSigningCertificate = false; }); PreConfigure<OpenIddictServerBuilder>(serverBuilder => { //should match with this 👇 serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "xxxx"); }); } }
Also, you can refer to our Configuring OpenIddict documentation for further info.
-
0
Sorry, the issue happened because of my mistake. I missed the keyprefix configuration