Open Closed

Set AccessTokenLifetime per client #9248


User avatar
0
magnus.bredeli@apx-systems.com created

Hello!

We are currently using your OpenIdDict module in our AuthServer. I want to set the access token lifetime differently for my web application and app.

I see in you you can set the lifetime globally like this: (https://abp.io/docs/latest/modules/openiddict#setting-tokens-lifetime)

PreConfigure(builder =>
{
    builder.SetAuthorizationCodeLifetime(TimeSpan.FromMinutes(30));
    builder.SetAccessTokenLifetime(TimeSpan.FromMinutes(30));
    builder.SetIdentityTokenLifetime(TimeSpan.FromMinutes(30));
});

I found this issue: https://github.com/abpframework/abp/issues/16529

However, the post is two years old and I am wondering whether ABP's OpenIdDict module now offers a an out-of-the-box way to set access token lifetime differently per client?

Best regards, Magnus


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

    hi

    You can set the app/client lifetime on the Openiddict Application page.

    see

  • User Avatar
    0
    magnus.bredeli@apx-systems.com created

    Great, thanks for the quick response!

    May I ask where I access the Openiddict Application page? Is it available at a spesific endpoint of the hosted auth server?

  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    hi

    The page in OpenIddict.Pro module.

    Package names: Volo.Abp.OpenIddict.Pro.Blazor.Server Volo.Abp.OpenIddict.Pro.Blazor.WebAssembly

    Module names:

    AbpOpenIddictProBlazorServerModule AbpOpenIddictProBlazorWebAssemblyModule

    Page URL is /openiddict/applications

  • User Avatar
    0
    magnus.bredeli@apx-systems.com created

    Alright great, thanks!

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    :)

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on May 15, 2025, 10:28