Starts in:
0 DAY
16 HRS
15 MIN
5 SEC
Starts in:
0 D
16 H
15 M
5 S
Open Closed

How to implement the token encryption in OpenIdDict #6562


User avatar
0
lht0502 created
  • ABP Framework version: v7.0.0
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hi, we found the builder.DisableAccessTokenEncryption(); in the AbpOpenIddictAspNetCoreModule.cs. Is there a way to enable back the Access Token Encryption?

Thanks.


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Angular needs to read the claims from the access token, so we disabled it.

    but you can enable it by setting DisableAccessTokenEncryption to false.

    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
        PreConfigure<OpenIddictServerBuilder>(builder =>
        {
            builder.Configure(openIddictServerOptions =>
            {
                openIddictServerOptions.DisableAccessTokenEncryption = false;
            });
        }
    }
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06